var e=Object.defineProperty,t=Object.getOwnPropertyNames;import{A as n,_ as i,y as o,E as r,B as a,H as s,h as l,C as c,f as u,aU as d,aV as h,aj as p,aW as m,aX as f,aY as g,aZ as y,a5 as v,a8 as b,a7 as w,p as x,d as C,q as _,a_ as S,r as k,a as E,n as $,j as M,z as R,aK as A,a$ as O,i as j,am as T,L as N,aB as L,b0 as I,W as D,aE as H,b1 as P,b2 as z,N as F,aT as V,Z as B,K as W,b3 as U,b4 as Y,b5 as Z,aw as G,F as q,b6 as K,ao as Q,ak as X,aD as J,ap as ee,U as te,ax as ne,$ as ie,u as oe,b7 as re,ay as ae,P as se,aA as le,az as ce,b8 as ue,v as de,at as he,l as pe,b9 as me,ba as fe,t as ge,bb as ye,bc as ve,a2 as be,w as we,x as xe,bd as Ce,X as _e,m as Se,a0 as ke,ab as Ee,ad as $e,ac as Me,af as Re,ae as Ae,be as Oe,ag as je,ah as Te,ai as Ne,a4 as Le,av as Ie,I as De,al as He,Q as Pe,G as ze,Y as Fe,an as Ve,V as Be,bf as We,bg as Ue,bh as Ye,aq as Ze,bi as Ge,S as qe,bj as Ke,bk as Qe,O as Xe,bl as Je,bm as et,bn as tt,bo as nt,bp as it,bq as ot,br as rt,bs as at,bt as st,bu as lt,bv as ct,bw as ut,bx as dt,by as ht,bz as pt,aC as mt,bA as ft,bB as gt,bC as yt,bD as vt}from"./vendor_antd_form-9acdc172.js";import{p as bt,C as wt,K as xt,B as Ct,c as _t,m as St,u as kt,I as Et,D as $t,g as Mt,a as Rt,i as At,b as Ot,d as jt,e as Tt,f as Nt,h as Lt,j as It,k as Dt,E as Ht,M as Pt,l as zt,n as Ft,o as Vt,t as Bt,q as Wt,r as Ut,s as Yt,v as Zt,w as Gt,x as qt,y as Kt,S as Qt,z as Xt,A as Jt,F as en,G as tn,L as nn,R as on,H as rn,J as an,N as sn,O as ln,P as cn,Q as un,T as dn,U as hn,V as pn,W as mn,X as fn,Y as gn,Z as yn,_ as vn,$ as bn,a0 as wn,a1 as xn,a2 as Cn,a3 as Sn,a4 as kn,a5 as En,a6 as $n}from"./vendor_antd_table-0c0188e2.js";var Mn,Rn,An=(Mn={"yaymail-main.tsx-4155e635.js"(t,et){var tt,nt,it={exports:{}},ot={},rt=window.React,at=Symbol.for("react.element"),st=Symbol.for("react.fragment"),lt=Object.prototype.hasOwnProperty,ct=rt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ut={key:!0,ref:!0,__self:!0,__source:!0};function ht(e,t,n){var i,o={},r=null,a=null;for(i in void 0!==n&&(r=""+n),void 0!==t.key&&(r=""+t.key),void 0!==t.ref&&(a=t.ref),t)lt.call(t,i)&&!ut.hasOwnProperty(i)&&(o[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===o[i]&&(o[i]=t[i]);return{$$typeof:at,type:e,key:r,ref:a,props:o,_owner:ct.current}}ot.Fragment=st,ot.jsx=ht,ot.jsxs=ht,it.exports=ot;var Mn=it.exports;function Rn(e,t){return(Rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function An(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Rn(e,t)}const On=window.React;var jn={error:null},Tn=function(e){function t(){for(var t,n=arguments.length,i=new Array(n),o=0;o({background:e,border:`${a(i.lineWidth)} ${i.lineType} ${t}`,[`${o}-icon`]:{color:n}}),Pn=e=>{const{componentCls:t,motionDurationSlow:n,marginXS:i,marginSM:o,fontSize:a,fontSizeLG:s,lineHeight:l,borderRadiusLG:c,motionEaseInOutCirc:u,withDescriptionIconSize:d,colorText:h,colorTextHeading:p,withDescriptionPadding:m,defaultPadding:f}=e;return{[t]:Object.assign(Object.assign({},r(e)),{position:"relative",display:"flex",alignItems:"center",padding:f,wordWrap:"break-word",borderRadius:c,[`&${t}-rtl`]:{direction:"rtl"},[`${t}-content`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:i,lineHeight:0},"&-description":{display:"none",fontSize:a,lineHeight:l},"&-message":{color:p},[`&${t}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${u}, opacity ${n} ${u},\n padding-top ${n} ${u}, padding-bottom ${n} ${u},\n margin-bottom ${n} ${u}`},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${t}-with-description`]:{alignItems:"flex-start",padding:m,[`${t}-icon`]:{marginInlineEnd:o,fontSize:d,lineHeight:0},[`${t}-message`]:{display:"block",marginBottom:i,color:p,fontSize:s},[`${t}-description`]:{display:"block",color:h}},[`${t}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},zn=e=>{const{componentCls:t,colorSuccess:n,colorSuccessBorder:i,colorSuccessBg:o,colorWarning:r,colorWarningBorder:a,colorWarningBg:s,colorError:l,colorErrorBorder:c,colorErrorBg:u,colorInfo:d,colorInfoBorder:h,colorInfoBg:p}=e;return{[t]:{"&-success":Hn(o,i,n,e,t),"&-info":Hn(p,h,d,e,t),"&-warning":Hn(s,a,r,e,t),"&-error":Object.assign(Object.assign({},Hn(u,c,l,e,t)),{[`${t}-description > pre`]:{margin:0,padding:0}})}}},Fn=e=>{const{componentCls:t,iconCls:n,motionDurationMid:i,marginXS:o,fontSizeIcon:r,colorIcon:s,colorIconHover:l}=e;return{[t]:{"&-action":{marginInlineStart:o},[`${t}-close-icon`]:{marginInlineStart:o,padding:0,overflow:"hidden",fontSize:r,lineHeight:a(r),backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:s,transition:`color ${i}`,"&:hover":{color:l}}},"&-close-text":{color:s,transition:`color ${i}`,"&:hover":{color:l}}}}},Vn=o("Alert",(e=>[Pn(e),zn(e),Fn(e)]),(e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`})));var Bn=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{icon:t,prefixCls:n,type:i}=e,o=Un[i]||null;return t?d(t,Wn.createElement("span",{className:`${n}-icon`},t),(()=>({className:l(`${n}-icon`,t.props.className)}))):Wn.createElement(o,{className:`${n}-icon`})},Zn=e=>{const{isClosable:t,prefixCls:n,closeIcon:i,handleClose:o,ariaProps:r}=e,a=!0===i||void 0===i?Wn.createElement(wt,null):i;return t?Wn.createElement("button",Object.assign({type:"button",onClick:o,className:`${n}-close-icon`,tabIndex:0},r),a):null},Gn=Wn.forwardRef(((e,t)=>{const{description:n,prefixCls:i,message:o,banner:r,className:a,rootClassName:d,style:h,onMouseEnter:p,onMouseLeave:m,onClick:f,afterClose:g,showIcon:y,closable:v,closeText:b,closeIcon:w,action:x,id:C}=e,_=Bn(e,["description","prefixCls","message","banner","className","rootClassName","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action","id"]),[S,k]=Wn.useState(!1),E=Wn.useRef(null);Wn.useImperativeHandle(t,(()=>({nativeElement:E.current})));const{getPrefixCls:$,direction:M,closable:R,closeIcon:A,className:O,style:j}=s("alert"),T=$("alert",i),[N,L,I]=Vn(T),D=t=>{var n;k(!0),null===(n=e.onClose)||void 0===n||n.call(e,t)},H=Wn.useMemo((()=>void 0!==e.type?e.type:r?"warning":"info"),[e.type,r]),P=Wn.useMemo((()=>!("object"!=typeof v||!v.closeIcon)||!!b||("boolean"==typeof v?v:!1!==w&&null!=w||!!R)),[b,w,v,R]),z=!(!r||void 0!==y)||y,F=l(T,`${T}-${H}`,{[`${T}-with-description`]:!!n,[`${T}-no-icon`]:!z,[`${T}-banner`]:!!r,[`${T}-rtl`]:"rtl"===M},O,a,d,I,L),V=bt(_,{aria:!0,data:!0}),B=Wn.useMemo((()=>"object"==typeof v&&v.closeIcon?v.closeIcon:b||(void 0!==w?w:"object"==typeof R&&R.closeIcon?R.closeIcon:A)),[w,v,b,A]),W=Wn.useMemo((()=>{const e=null!=v?v:R;return"object"==typeof e?Bn(e,["closeIcon"]):{}}),[v,R]);return N(Wn.createElement(c,{visible:!S,motionName:`${T}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:g},(({className:t,style:i},r)=>Wn.createElement("div",Object.assign({id:C,ref:u(E,r),"data-show":!S,className:l(F,t),style:Object.assign(Object.assign(Object.assign({},j),h),i),onMouseEnter:p,onMouseLeave:m,onClick:f,role:"alert"},V),z?Wn.createElement(Yn,{description:n,icon:e.icon,prefixCls:T,type:H}):null,Wn.createElement("div",{className:`${T}-content`},o?Wn.createElement("div",{className:`${T}-message`},o):null,n?Wn.createElement("div",{className:`${T}-description`},n):null),x?Wn.createElement("div",{className:`${T}-action`},x):null,Wn.createElement(Zn,{isClosable:P,prefixCls:T,closeIcon:B,handleClose:D,ariaProps:W})))))})),qn=window.React;let Kn=function(e){function t(){var e,n,i,o;return w(this,t),n=this,o=arguments,i=f(i=t),(e=g(n,y()?Reflect.construct(i,o||[],f(n).constructor):i.apply(n,o))).state={error:void 0,info:{componentStack:""}},e}return v(t,e),b(t,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,info:t})}},{key:"render",value:function(){const{message:e,description:t,id:n,children:i}=this.props,{error:o,info:r}=this.state,a=(null==r?void 0:r.componentStack)||null,s=void 0===e?(o||"").toString():e,l=void 0===t?a:t;return o?qn.createElement(Gn,{id:n,type:"error",message:s,description:qn.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},l)}):i}}])}(qn.Component);const Qn=Kn,Xn=Gn;Xn.ErrorBoundary=Qn;const Jn=Xn,ei=window.React;var ti=ei.forwardRef((function(e,t){var n=e.prefixCls,o=e.style,r=e.className,a=e.duration,s=void 0===a?4.5:a,c=e.showProgress,u=e.pauseOnHover,d=void 0===u||u,h=e.eventKey,p=e.content,m=e.closable,f=e.closeIcon,g=void 0===f?"x":f,y=e.props,v=e.onClick,b=e.onNoticeClose,w=e.times,S=e.hovering,k=ei.useState(!1),E=x(k,2),$=E[0],M=E[1],R=ei.useState(0),A=x(R,2),O=A[0],j=A[1],T=ei.useState(0),N=x(T,2),L=N[0],I=N[1],D=S||$,H=s>0&&c,P=function(){b(h)};ei.useEffect((function(){if(!D&&s>0){var e=Date.now()-L,t=setTimeout((function(){P()}),1e3*s-L);return function(){d&&clearTimeout(t),I(Date.now()-e)}}}),[s,D,w]),ei.useEffect((function(){if(!D&&H&&(d||0===L)){var e,t=performance.now();return function n(){cancelAnimationFrame(e),e=requestAnimationFrame((function(e){var i=e+L-t,o=Math.min(i/(1e3*s),1);j(100*o),o<1&&n()}))}(),function(){d&&cancelAnimationFrame(e)}}}),[s,L,D,H,w]);var z=ei.useMemo((function(){return"object"===C(m)&&null!==m?m:m?{closeIcon:g}:{}}),[m,g]),F=bt(z,!0),V=100-(!O||O<0?0:O>100?100:O),B="".concat(n,"-notice");return ei.createElement("div",i({},y,{ref:t,className:l(B,r,_({},"".concat(B,"-closable"),m)),style:o,onMouseEnter:function(e){var t;M(!0),null==y||null===(t=y.onMouseEnter)||void 0===t||t.call(y,e)},onMouseLeave:function(e){var t;M(!1),null==y||null===(t=y.onMouseLeave)||void 0===t||t.call(y,e)},onClick:v}),ei.createElement("div",{className:"".concat(B,"-content")},p),m&&ei.createElement("a",i({tabIndex:0,className:"".concat(B,"-close"),onKeyDown:function(e){"Enter"!==e.key&&"Enter"!==e.code&&e.keyCode!==xt.ENTER||P()},"aria-label":"Close"},F,{onClick:function(e){e.preventDefault(),e.stopPropagation(),P()}}),z.closeIcon),H&&ei.createElement("progress",{className:"".concat(B,"-progress"),max:"100",value:V},V+"%"))}));const ni=window.React;var ii=ni.createContext({}),oi=function(e){var t=e.children,n=e.classNames;return ni.createElement(ii.Provider,{value:{classNames:n}},t)},ri=["className","style","classNames","styles"];const ai=window.React,si=window.React.useContext,li=window.React.useEffect,ci=window.React.useRef,ui=window.React.useState;var di=function(e){var t,n,o,r,a,s=e.configList,c=e.placement,u=e.prefixCls,d=e.className,h=e.style,p=e.motion,m=e.onAllNoticeRemoved,f=e.onNoticeClose,g=e.stack,y=si(ii).classNames,v=ci({}),b=ui(null),w=x(b,2),M=w[0],R=w[1],A=ui([]),O=x(A,2),j=O[0],T=O[1],N=s.map((function(e){return{config:e,key:String(e.key)}})),L=(a={offset:8,threshold:3,gap:16},(t=g)&&"object"===C(t)&&(a.offset=null!==(n=t.offset)&&void 0!==n?n:8,a.threshold=null!==(o=t.threshold)&&void 0!==o?o:3,a.gap=null!==(r=t.gap)&&void 0!==r?r:16),[!!t,a]),I=x(L,2),D=I[0],H=I[1],P=H.offset,z=H.threshold,F=H.gap,V=D&&(j.length>0||N.length<=z),B="function"==typeof p?p(c):p;return li((function(){D&&j.length>1&&T((function(e){return e.filter((function(e){return N.some((function(t){var n=t.key;return e===n}))}))}))}),[j,N,D]),li((function(){var e,t;D&&v.current[null===(e=N[N.length-1])||void 0===e?void 0:e.key]&&R(v.current[null===(t=N[N.length-1])||void 0===t?void 0:t.key])}),[N,D]),ai.createElement(S,i({key:c,className:l(u,"".concat(u,"-").concat(c),null==y?void 0:y.list,d,_(_({},"".concat(u,"-stack"),!!D),"".concat(u,"-stack-expanded"),V)),style:h,keys:N,motionAppear:!0},B,{onAllRemoved:function(){m(c)}}),(function(e,t){var n=e.config,o=e.className,r=e.style,a=e.index,s=n,d=s.key,h=s.times,p=String(d),m=n,g=m.className,b=m.style,w=m.classNames,x=m.styles,C=k(m,ri),_=N.findIndex((function(e){return e.key===p})),S={};if(D){var R=N.length-1-(_>-1?_:a-1),A="top"===c||"bottom"===c?"-50%":"0";if(R>0){var O,L,I;S.height=V?null===(O=v.current[p])||void 0===O?void 0:O.offsetHeight:null==M?void 0:M.offsetHeight;for(var H=0,z=0;z-1?v.current[p]=e:delete v.current[p]},prefixCls:u,classNames:w,styles:x,className:l(g,null==y?void 0:y.notice),style:b,times:h,key:d,eventKey:d,onNoticeClose:f,hovering:D&&j.length>0})))}))};const hi=window.React,pi=window.ReactDOM.createPortal;var mi=hi.forwardRef((function(e,t){var n=e.prefixCls,i=void 0===n?"rc-notification":n,o=e.container,r=e.motion,a=e.maxCount,s=e.className,l=e.style,c=e.onAllRemoved,u=e.stack,d=e.renderNotifications,h=hi.useState([]),p=x(h,2),m=p[0],f=p[1],g=function(e){var t,n=m.find((function(t){return t.key===e}));null==n||null===(t=n.onClose)||void 0===t||t.call(n),f((function(t){return t.filter((function(t){return t.key!==e}))}))};hi.useImperativeHandle(t,(function(){return{open:function(e){f((function(t){var n,i=$(t),o=i.findIndex((function(t){return t.key===e.key})),r=E({},e);return o>=0?(r.times=((null===(n=t[o])||void 0===n?void 0:n.times)||0)+1,i[o]=r):(r.times=0,i.push(r)),a>0&&i.length>a&&(i=i.slice(-a)),i}))},close:function(e){g(e)},destroy:function(){f([])}}}));var y=hi.useState({}),v=x(y,2),b=v[0],w=v[1];hi.useEffect((function(){var e={};m.forEach((function(t){var n=t.placement,i=void 0===n?"topRight":n;i&&(e[i]=e[i]||[],e[i].push(t))})),Object.keys(b).forEach((function(t){e[t]=e[t]||[]})),w(e)}),[m]);var C=function(e){w((function(t){var n=E({},t);return(n[e]||[]).length||delete n[e],n}))},_=hi.useRef(!1);if(hi.useEffect((function(){Object.keys(b).length>0?_.current=!0:_.current&&(null==c||c(),_.current=!1)}),[b]),!o)return null;var S=Object.keys(b);return pi(hi.createElement(hi.Fragment,null,S.map((function(e){var t=b[e],n=hi.createElement(di,{key:e,configList:t,placement:e,prefixCls:i,className:null==s?void 0:s(e),style:null==l?void 0:l(e),motion:r,onNoticeClose:g,onAllNoticeRemoved:C,stack:u});return d?d(n,{prefixCls:i,key:e}):n}))),o)})),fi=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"];const gi=window.React;var yi=function(){return document.body},vi=0;function bi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getContainer,n=void 0===t?yi:t,i=e.motion,o=e.prefixCls,r=e.maxCount,a=e.className,s=e.style,l=e.onAllRemoved,c=e.stack,u=e.renderNotifications,d=k(e,fi),h=gi.useState(),p=x(h,2),m=p[0],f=p[1],g=gi.useRef(),y=gi.createElement(mi,{container:m,ref:g,prefixCls:o,motion:i,maxCount:r,className:a,style:s,onAllRemoved:l,stack:c,renderNotifications:u}),v=gi.useState([]),b=x(v,2),w=b[0],C=b[1],_=M((function(e){var t=function(){for(var e={},t=arguments.length,n=new Array(t),i=0;i(e=>{const{componentCls:t,iconCls:n,boxShadow:i,colorText:o,colorSuccess:a,colorError:s,colorWarning:l,colorInfo:c,fontSizeLG:u,motionEaseInOutCirc:d,motionDurationSlow:h,marginXS:p,paddingXS:m,borderRadiusLG:f,zIndexPopup:g,contentPadding:y,contentBg:v}=e,b=`${t}-notice`,w=new A("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:m,transform:"translateY(0)",opacity:1}}),x=new A("MessageMoveOut",{"0%":{maxHeight:e.height,padding:m,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),C={padding:m,textAlign:"center",[`${t}-custom-content`]:{display:"flex",alignItems:"center"},[`${t}-custom-content > ${n}`]:{marginInlineEnd:p,fontSize:u},[`${b}-content`]:{display:"inline-block",padding:y,background:v,borderRadius:f,boxShadow:i,pointerEvents:"all"},[`${t}-success > ${n}`]:{color:a},[`${t}-error > ${n}`]:{color:s},[`${t}-warning > ${n}`]:{color:l},[`${t}-info > ${n},\n ${t}-loading > ${n}`]:{color:c}};return[{[t]:Object.assign(Object.assign({},r(e)),{color:o,position:"fixed",top:p,width:"100%",pointerEvents:"none",zIndex:g,[`${t}-move-up`]:{animationFillMode:"forwards"},[`\n ${t}-move-up-appear,\n ${t}-move-up-enter\n `]:{animationName:w,animationDuration:h,animationPlayState:"paused",animationTimingFunction:d},[`\n ${t}-move-up-appear${t}-move-up-appear-active,\n ${t}-move-up-enter${t}-move-up-enter-active\n `]:{animationPlayState:"running"},[`${t}-move-up-leave`]:{animationName:x,animationDuration:h,animationPlayState:"paused",animationTimingFunction:d},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[t]:{[`${b}-wrapper`]:Object.assign({},C)}},{[`${t}-notice-pure-panel`]:Object.assign(Object.assign({},C),{padding:0,textAlign:"start"})}]})(R(e,{height:150}))),(e=>({zIndexPopup:e.zIndexPopupBase+O+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`})));var xi=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);oCi.createElement("div",{className:l(`${e}-custom-content`,`${e}-${t}`)},n||_i[t],Ci.createElement("span",null,i));function ki(e){let t;const n=new Promise((n=>{t=e((()=>{n(!0)}))})),i=()=>{null==t||t()};return i.then=(e,t)=>n.then(e,t),i.promise=n,i}var Ei=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const n=T(t),[i,o,r]=wi(t,n);return i($i.createElement(oi,{classNames:{list:l(o,r,n)}},e))},Ai=(e,{prefixCls:t,key:n})=>$i.createElement(Ri,{prefixCls:t,key:n},e),Oi=$i.forwardRef(((e,t)=>{const{top:n,prefixCls:i,getContainer:o,maxCount:r,duration:a=Mi,rtl:s,transitionName:c,onAllRemoved:u}=e,{getPrefixCls:d,getPopupContainer:h,message:p,direction:m}=$i.useContext(j),f=i||d("message"),g=$i.createElement("span",{className:`${f}-close-x`},$i.createElement(wt,{className:`${f}-close-icon`})),[y,v]=bi({prefixCls:f,style:()=>({left:"50%",transform:"translateX(-50%)",top:null!=n?n:8}),className:()=>l({[`${f}-rtl`]:null!=s?s:"rtl"===m}),motion:()=>function(e,t){return{motionName:null!=t?t:`${e}-move-up`}}(f,c),closable:!1,closeIcon:g,duration:a,getContainer:()=>(null==o?void 0:o())||(null==h?void 0:h())||document.body,maxCount:r,onAllRemoved:u,renderNotifications:Ai});return $i.useImperativeHandle(t,(()=>Object.assign(Object.assign({},y),{prefixCls:f,message:p}))),v}));let ji=0;function Ti(e){const t=$i.useRef(null);return L(),[$i.useMemo((()=>{const e=e=>{var n;null===(n=t.current)||void 0===n||n.close(e)},n=n=>{if(!t.current){const e=()=>{};return e.then=()=>{},e}const{open:i,prefixCls:o,message:r}=t.current,a=`${o}-notice`,{content:s,icon:c,type:u,key:d,className:h,style:p,onClose:m}=n,f=Ei(n,["content","icon","type","key","className","style","onClose"]);let g=d;return null==g&&(ji+=1,g=`antd-message-${ji}`),ki((t=>(i(Object.assign(Object.assign({},f),{key:g,content:$i.createElement(Si,{prefixCls:o,type:u,icon:c},s),placement:"top",className:l(u&&`${a}-${u}`,h,null==r?void 0:r.className),style:Object.assign(Object.assign({},null==r?void 0:r.style),p),onClose:()=>{null==m||m(),t()}})),()=>{e(g)})))},i={open:n,destroy:n=>{var i;void 0!==n?e(n):null===(i=t.current)||void 0===i||i.destroy()}};return["info","success","warning","error","loading"].forEach((e=>{i[e]=(t,i,o)=>{let r,a,s;r=t&&"object"==typeof t&&"content"in t?t:{content:t},"function"==typeof i?s=i:(a=i,s=o);const l=Object.assign(Object.assign({onClose:s,duration:a},r),{type:e});return n(l)}})),i}),[]),$i.createElement(Oi,Object.assign({key:"message-holder"},e,{ref:t}))]}const Ni=window.React,Li=window.React,Ii=e=>"function"==typeof(null==e?void 0:e.then),Di=e=>{const{type:t,children:n,prefixCls:i,buttonProps:o,close:r,autoFocus:a,emitEvent:s,isSilent:l,quitOnNullishReturnValue:c,actionFn:u}=e,d=Li.useRef(!1),h=Li.useRef(null),[p,m]=I(!1),f=(...e)=>{null==r||r.apply(void 0,e)};return Li.useEffect((()=>{let e=null;return a&&(e=setTimeout((()=>{var e;null===(e=h.current)||void 0===e||e.focus({preventScroll:!0})}))),()=>{e&&clearTimeout(e)}}),[]),Li.createElement(Ct,Object.assign({},_t(t),{onClick:e=>{if(d.current)return;if(d.current=!0,!u)return void f();let t;if(s){if(t=u(e),c&&!Ii(t))return d.current=!1,void f(e)}else if(u.length)t=u(r),d.current=!1;else if(t=u(),!Ii(t))return void f();(e=>{Ii(e)&&(m(!0),e.then(((...e)=>{m(!1,!0),f.apply(void 0,e),d.current=!1}),(e=>{if(m(!1,!0),d.current=!1,!(null==l?void 0:l()))return Promise.reject(e)})))})(t)},loading:p,prefixCls:i},o,{ref:h}),n)},Hi=window.React.createContext({}),{Provider:Pi}=Hi,zi=window.React,Fi=window.React.useContext,Vi=()=>{const{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:n,isSilent:i,mergedOkCancel:o,rootPrefixCls:r,close:a,onCancel:s,onConfirm:l}=Fi(Hi);return o?zi.createElement(Di,{isSilent:i,actionFn:s,close:(...e)=>{null==a||a.apply(void 0,e),null==l||l(!1)},autoFocus:"cancel"===e,buttonProps:t,prefixCls:`${r}-btn`},n):null},Bi=window.React,Wi=window.React.useContext,Ui=()=>{const{autoFocusButton:e,close:t,isSilent:n,okButtonProps:i,rootPrefixCls:o,okTextLocale:r,okType:a,onConfirm:s,onOk:l}=Wi(Hi);return Bi.createElement(Di,{isSilent:n,type:a||"primary",actionFn:l,close:(...e)=>{null==t||t.apply(void 0,e),null==s||s(!0)},autoFocus:"ok"===e,buttonProps:i,prefixCls:`${o}-btn`},r)};var Yi=window.React.createContext({});function Zi(e,t,n){var i=t;return!i&&n&&(i="".concat(e,"-").concat(n)),i}function Gi(e,t){var n=e["page".concat(t?"Y":"X","Offset")],i="scroll".concat(t?"Top":"Left");if("number"!=typeof n){var o=e.document;"number"!=typeof(n=o.documentElement[i])&&(n=o.body[i])}return n}const qi=window.React.memo((function(e){return e.children}),(function(e,t){return!t.shouldUpdate})),Ki=window.React,Qi=window.React.useMemo,Xi=window.React.useRef;var Ji={width:0,height:0,overflow:"hidden",outline:"none"},eo={outline:"none"},to=Ki.forwardRef((function(e,t){var n=e.prefixCls,o=e.className,r=e.style,a=e.title,s=e.ariaId,c=e.footer,u=e.closable,d=e.closeIcon,h=e.onClose,p=e.children,m=e.bodyStyle,f=e.bodyProps,g=e.modalRender,y=e.onMouseDown,v=e.onMouseUp,b=e.holderRef,w=e.visible,x=e.forceRender,_=e.width,S=e.height,k=e.classNames,$=e.styles,M=Ki.useContext(Yi).panel,R=D(b,M),A=Xi(),O=Xi();Ki.useImperativeHandle(t,(function(){return{focus:function(){var e;null===(e=A.current)||void 0===e||e.focus({preventScroll:!0})},changeActive:function(e){var t=document.activeElement;e&&t===O.current?A.current.focus({preventScroll:!0}):e||t!==A.current||O.current.focus({preventScroll:!0})}}}));var j={};void 0!==_&&(j.width=_),void 0!==S&&(j.height=S);var T=c?Ki.createElement("div",{className:l("".concat(n,"-footer"),null==k?void 0:k.footer),style:E({},null==$?void 0:$.footer)},c):null,N=a?Ki.createElement("div",{className:l("".concat(n,"-header"),null==k?void 0:k.header),style:E({},null==$?void 0:$.header)},Ki.createElement("div",{className:"".concat(n,"-title"),id:s},a)):null,L=Qi((function(){return"object"===C(u)&&null!==u?u:u?{closeIcon:null!=d?d:Ki.createElement("span",{className:"".concat(n,"-close-x")})}:{}}),[u,d,n]),I=bt(L,!0),H="object"===C(u)&&u.disabled,P=u?Ki.createElement("button",i({type:"button",onClick:h,"aria-label":"Close"},I,{className:"".concat(n,"-close"),disabled:H}),L.closeIcon):null,z=Ki.createElement("div",{className:l("".concat(n,"-content"),null==k?void 0:k.content),style:null==$?void 0:$.content},P,N,Ki.createElement("div",i({className:l("".concat(n,"-body"),null==k?void 0:k.body),style:E(E({},m),null==$?void 0:$.body)},f),p),T);return Ki.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":a?s:null,"aria-modal":"true",ref:R,style:E(E({},r),j),className:l(n,o),onMouseDown:y,onMouseUp:v},Ki.createElement("div",{ref:A,tabIndex:0,style:eo},Ki.createElement(qi,{shouldUpdate:w||x},g?g(z):z)),Ki.createElement("div",{tabIndex:0,ref:O,style:Ji}))}));const no=window.React,io=window.React.useRef;var oo=no.forwardRef((function(e,t){var n=e.prefixCls,o=e.title,r=e.style,a=e.className,s=e.visible,u=e.forceRender,d=e.destroyOnClose,h=e.motionName,p=e.ariaId,m=e.onVisibleChanged,f=e.mousePosition,g=io(),y=no.useState(),v=x(y,2),b=v[0],w=v[1],C={};function _(){var e,t,n,i,o,r=(n={left:(t=(e=g.current).getBoundingClientRect()).left,top:t.top},o=(i=e.ownerDocument).defaultView||i.parentWindow,n.left+=Gi(o),n.top+=Gi(o,!0),n);w(f&&(f.x||f.y)?"".concat(f.x-r.left,"px ").concat(f.y-r.top,"px"):"")}return b&&(C.transformOrigin=b),no.createElement(c,{visible:s,onVisibleChanged:m,onAppearPrepare:_,onEnterPrepare:_,forceRender:u,motionName:h,removeOnLeave:d,ref:g},(function(s,c){var u=s.className,d=s.style;return no.createElement(to,i({},e,{ref:t,title:o,ariaId:p,prefixCls:n,holderRef:c,style:E(E(E({},d),r),C),className:l(a,u)}))}))}));oo.displayName="Content";const ro=window.React;var ao=function(e){var t=e.prefixCls,n=e.style,o=e.visible,r=e.maskProps,a=e.motionName,s=e.className;return ro.createElement(c,{key:"mask",visible:o,motionName:a,leavedClassName:"".concat(t,"-mask-hidden")},(function(e,o){var a=e.className,c=e.style;return ro.createElement("div",i({ref:o,style:E(E({},c),n),className:l("".concat(t,"-mask"),a,s)},r))}))};const so=window.React,lo=window.React.useEffect,co=window.React.useRef;var uo=function(e){var t=e.prefixCls,n=void 0===t?"rc-dialog":t,o=e.zIndex,r=e.visible,a=void 0!==r&&r,s=e.keyboard,c=void 0===s||s,u=e.focusTriggerAfterClose,d=void 0===u||u,h=e.wrapStyle,p=e.wrapClassName,m=e.wrapProps,f=e.onClose,g=e.afterOpenChange,y=e.afterClose,v=e.transitionName,b=e.animation,w=e.closable,C=void 0===w||w,_=e.mask,S=void 0===_||_,k=e.maskTransitionName,$=e.maskAnimation,M=e.maskClosable,R=void 0===M||M,A=e.maskStyle,O=e.maskProps,j=e.rootClassName,T=e.classNames,N=e.styles,L=co(),I=co(),D=co(),z=so.useState(a),F=x(z,2),V=F[0],B=F[1],W=H();function U(e){null==f||f(e)}var Y=co(!1),Z=co(),G=null;R&&(G=function(e){Y.current?Y.current=!1:I.current===e.target&&U(e)}),lo((function(){a&&(B(!0),P(I.current,document.activeElement)||(L.current=document.activeElement))}),[a]),lo((function(){return function(){clearTimeout(Z.current)}}),[]);var q=E(E(E({zIndex:o},h),null==N?void 0:N.wrapper),{},{display:V?null:"none"});return so.createElement("div",i({className:l("".concat(n,"-root"),j)},bt(e,{data:!0})),so.createElement(ao,{prefixCls:n,visible:S&&a,motionName:Zi(n,k,$),style:E(E({zIndex:o},A),null==N?void 0:N.mask),maskProps:O,className:null==T?void 0:T.mask}),so.createElement("div",i({tabIndex:-1,onKeyDown:function(e){if(c&&e.keyCode===xt.ESC)return e.stopPropagation(),void U(e);a&&e.keyCode===xt.TAB&&D.current.changeActive(!e.shiftKey)},className:l("".concat(n,"-wrap"),p,null==T?void 0:T.wrapper),ref:I,onClick:G,style:q},m),so.createElement(oo,i({},e,{onMouseDown:function(){clearTimeout(Z.current),Y.current=!0},onMouseUp:function(){Z.current=setTimeout((function(){Y.current=!1}))},ref:D,closable:C,ariaId:W,prefixCls:n,visible:a&&V,onClose:U,onVisibleChanged:function(e){if(e)P(I.current,document.activeElement)||null===(t=D.current)||void 0===t||t.focus();else{if(B(!1),S&&L.current&&d){try{L.current.focus({preventScroll:!0})}catch(n){}L.current=null}V&&(null==y||y())}var t;null==g||g(e)},motionName:Zi(n,v,b)}))))};const ho=window.React;var po=function(e){var t=e.visible,n=e.getContainer,o=e.forceRender,r=e.destroyOnClose,a=void 0!==r&&r,s=e.afterClose,l=e.panelRef,c=ho.useState(t),u=x(c,2),d=u[0],h=u[1],p=ho.useMemo((function(){return{panel:l}}),[l]);return ho.useEffect((function(){t&&h(!0)}),[t]),o||!a||d?ho.createElement(Yi.Provider,{value:p},ho.createElement(z,{open:t||o||d,autoDestroy:!1,getContainer:n,autoLock:t||d},ho.createElement(uo,i({},e,{destroyOnClose:a,afterClose:function(){null==s||s(),h(!1)}})))):null};po.displayName="Dialog";const mo=window.React;function fo(e){if(!e)return;const{closable:t,closeIcon:n}=e;return{closable:t,closeIcon:n}}function go(e){const{closable:t,closeIcon:n}=e||{};return mo.useMemo((()=>{if(!t&&(!1===t||!1===n||null===n))return!1;if(void 0===t&&void 0===n)return null;let e={closeIcon:"boolean"!=typeof n&&null!==n?n:void 0};return t&&"object"==typeof t&&(e=Object.assign(Object.assign({},e),t)),e}),[t,n])}const yo={};function vo(e,t,n=yo){const i=go(e),o=go(t),[r]=F("global",V.global),a="boolean"!=typeof i&&!!(null==i?void 0:i.disabled),s=mo.useMemo((()=>Object.assign({closeIcon:mo.createElement(wt,null)},n)),[n]),l=mo.useMemo((()=>!1!==i&&(i?St(s,o,i):!1!==o&&(o?St(s,o):!!s.closable&&s))),[i,o,s]);return mo.useMemo((()=>{var e,t;if(!1===l)return[!1,null,a,{}];const{closeIconRender:n}=s,{closeIcon:i}=l;let o=i;const c=bt(l,!0);return null!=o&&(n&&(o=n(i)),o=mo.isValidElement(o)?mo.cloneElement(o,Object.assign(Object.assign(Object.assign({},o.props),{"aria-label":null!==(t=null===(e=o.props)||void 0===e?void 0:e["aria-label"])&&void 0!==t?t:r.close}),c)):mo.createElement("span",Object.assign({"aria-label":r.close},c),o)),[!0,o,a,c]}),[l,s])}const bo=window.React,wo=e=>{const{prefixCls:t,className:n,style:i,size:o,shape:r}=e,a=l({[`${t}-lg`]:"large"===o,[`${t}-sm`]:"small"===o}),s=l({[`${t}-circle`]:"circle"===r,[`${t}-square`]:"square"===r,[`${t}-round`]:"round"===r}),c=bo.useMemo((()=>"number"==typeof o?{width:o,height:o,lineHeight:`${o}px`}:{}),[o]);return bo.createElement("span",{className:l(t,a,s,n),style:Object.assign(Object.assign({},c),i)})},xo=new A("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),Co=e=>({height:e,lineHeight:a(e)}),_o=e=>Object.assign({width:e},Co(e)),So=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:xo,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),ko=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},Co(e)),Eo=e=>{const{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:i,controlHeightLG:o,controlHeightSM:r}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},_o(i)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},_o(o)),[`${t}${t}-sm`]:Object.assign({},_o(r))}},$o=e=>{const{controlHeight:t,borderRadiusSM:n,skeletonInputCls:i,controlHeightLG:o,controlHeightSM:r,gradientFromColor:a,calc:s}=e;return{[i]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:n},ko(t,s)),[`${i}-lg`]:Object.assign({},ko(o,s)),[`${i}-sm`]:Object.assign({},ko(r,s))}},Mo=e=>Object.assign({width:e},Co(e)),Ro=e=>{const{skeletonImageCls:t,imageSizeBase:n,gradientFromColor:i,borderRadiusSM:o,calc:r}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:i,borderRadius:o},Mo(r(n).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},Mo(n)),{maxWidth:r(n).mul(4).equal(),maxHeight:r(n).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}},Ao=(e,t,n)=>{const{skeletonButtonCls:i}=e;return{[`${n}${i}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${i}-round`]:{borderRadius:t}}},Oo=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},Co(e)),jo=e=>{const{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:i,controlHeightLG:o,controlHeightSM:r,gradientFromColor:a,calc:s}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:t,width:s(i).mul(2).equal(),minWidth:s(i).mul(2).equal()},Oo(i,s))},Ao(e,i,n)),{[`${n}-lg`]:Object.assign({},Oo(o,s))}),Ao(e,o,`${n}-lg`)),{[`${n}-sm`]:Object.assign({},Oo(r,s))}),Ao(e,r,`${n}-sm`))},To=o("Skeleton",(e=>{const{componentCls:t,calc:n}=e;return(e=>{const{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:i,skeletonParagraphCls:o,skeletonButtonCls:r,skeletonInputCls:a,skeletonImageCls:s,controlHeight:l,controlHeightLG:c,controlHeightSM:u,gradientFromColor:d,padding:h,marginSM:p,borderRadius:m,titleHeight:f,blockRadius:g,paragraphLiHeight:y,controlHeightXS:v,paragraphMarginTop:b}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:h,verticalAlign:"top",[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:d},_o(l)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:Object.assign({},_o(c)),[`${n}-sm`]:Object.assign({},_o(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[i]:{width:"100%",height:f,background:d,borderRadius:g,[`+ ${o}`]:{marginBlockStart:u}},[o]:{padding:0,"> li":{width:"100%",height:y,listStyle:"none",background:d,borderRadius:g,"+ li":{marginBlockStart:v}}},[`${o}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${i}, ${o} > li`]:{borderRadius:m}}},[`${t}-with-avatar ${t}-content`]:{[i]:{marginBlockStart:p,[`+ ${o}`]:{marginBlockStart:b}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},jo(e)),Eo(e)),$o(e)),Ro(e)),[`${t}${t}-block`]:{width:"100%",[r]:{width:"100%"},[a]:{width:"100%"}},[`${t}${t}-active`]:{[`\n ${i},\n ${o} > li,\n ${n},\n ${r},\n ${a},\n ${s}\n `]:Object.assign({},So(e))}}})(R(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"}))}),(e=>{const{colorFillContent:t,colorFill:n}=e;return{color:t,colorGradientEnd:n,gradientFromColor:t,gradientToColor:n,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}}),{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),No=window.React,Lo=window.React,Io=window.React,Do=window.React,Ho=window.React,Po=window.React,zo=(e,t)=>{const{width:n,rows:i=2}=t;return Array.isArray(n)?n[e]:i-1===e?n:void 0},Fo=e=>{const{prefixCls:t,className:n,style:i,rows:o=0}=e,r=Array.from({length:o}).map(((t,n)=>Po.createElement("li",{key:n,style:{width:zo(n,e)}})));return Po.createElement("ul",{className:l(t,n),style:i},r)},Vo=window.React,Bo=({prefixCls:e,className:t,width:n,style:i})=>Vo.createElement("h3",{className:l(e,t),style:Object.assign({width:n},i)}),Wo=window.React;function Uo(e){return e&&"object"==typeof e?e:{}}const Yo=e=>{const{prefixCls:t,loading:n,className:i,rootClassName:o,style:r,children:a,avatar:c=!1,title:u=!0,paragraph:d=!0,active:h,round:p}=e,{getPrefixCls:m,direction:f,className:g,style:y}=s("skeleton"),v=m("skeleton",t),[b,w,x]=To(v);if(n||!("loading"in e)){const e=!!c,t=!!u,n=!!d;let a,s;if(e){const e=Object.assign(Object.assign({prefixCls:`${v}-avatar`},function(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}(t,n)),Uo(c));a=Wo.createElement("div",{className:`${v}-header`},Wo.createElement(wo,Object.assign({},e)))}if(t||n){let i,o;if(t){const t=Object.assign(Object.assign({prefixCls:`${v}-title`},function(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}(e,n)),Uo(u));i=Wo.createElement(Bo,Object.assign({},t))}if(n){const n=Object.assign(Object.assign({prefixCls:`${v}-paragraph`},function(e,t){const n={};return e&&t||(n.width="61%"),n.rows=!e&&t?3:2,n}(e,t)),Uo(d));o=Wo.createElement(Fo,Object.assign({},n))}s=Wo.createElement("div",{className:`${v}-content`},i,o)}const m=l(v,{[`${v}-with-avatar`]:e,[`${v}-active`]:h,[`${v}-rtl`]:"rtl"===f,[`${v}-round`]:p},g,i,o,w,x);return b(Wo.createElement("div",{className:m,style:Object.assign(Object.assign({},y),r)},a,s))}return null!=a?a:null};Yo.Button=e=>{const{prefixCls:t,className:n,rootClassName:i,active:o,block:r=!1,size:a="default"}=e,{getPrefixCls:s}=Lo.useContext(j),c=s("skeleton",t),[u,d,h]=To(c),p=W(e,["prefixCls"]),m=l(c,`${c}-element`,{[`${c}-active`]:o,[`${c}-block`]:r},n,i,d,h);return u(Lo.createElement("div",{className:m},Lo.createElement(wo,Object.assign({prefixCls:`${c}-button`,size:a},p))))},Yo.Avatar=e=>{const{prefixCls:t,className:n,rootClassName:i,active:o,shape:r="circle",size:a="default"}=e,{getPrefixCls:s}=No.useContext(j),c=s("skeleton",t),[u,d,h]=To(c),p=W(e,["prefixCls","className"]),m=l(c,`${c}-element`,{[`${c}-active`]:o},n,i,d,h);return u(No.createElement("div",{className:m},No.createElement(wo,Object.assign({prefixCls:`${c}-avatar`,shape:r,size:a},p))))},Yo.Input=e=>{const{prefixCls:t,className:n,rootClassName:i,active:o,block:r,size:a="default"}=e,{getPrefixCls:s}=Do.useContext(j),c=s("skeleton",t),[u,d,h]=To(c),p=W(e,["prefixCls"]),m=l(c,`${c}-element`,{[`${c}-active`]:o,[`${c}-block`]:r},n,i,d,h);return u(Do.createElement("div",{className:m},Do.createElement(wo,Object.assign({prefixCls:`${c}-input`,size:a},p))))},Yo.Image=e=>{const{prefixCls:t,className:n,rootClassName:i,style:o,active:r}=e,{getPrefixCls:a}=Io.useContext(j),s=a("skeleton",t),[c,u,d]=To(s),h=l(s,`${s}-element`,{[`${s}-active`]:r},n,i,u,d);return c(Io.createElement("div",{className:h},Io.createElement("div",{className:l(`${s}-image`,n),style:o},Io.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${s}-image-svg`},Io.createElement("title",null,"Image placeholder"),Io.createElement("path",{d:"M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",className:`${s}-image-path`})))))},Yo.Node=e=>{const{prefixCls:t,className:n,rootClassName:i,style:o,active:r,children:a}=e,{getPrefixCls:s}=Ho.useContext(j),c=s("skeleton",t),[u,d,h]=To(c),p=l(c,`${c}-element`,{[`${c}-active`]:r},d,n,i,h);return u(Ho.createElement("div",{className:p},Ho.createElement("div",{className:l(`${c}-image`,n),style:o},a)))};const Zo=Yo,Go=window.React;function qo(){}const Ko=Go.createContext({add:qo,remove:qo}),Qo=window.React,Xo=window.React.useContext,Jo=()=>{const{cancelButtonProps:e,cancelTextLocale:t,onCancel:n}=Xo(Hi);return Qo.createElement(Ct,Object.assign({onClick:n},e),t)},er=window.React,tr=window.React.useContext,nr=()=>{const{confirmLoading:e,okButtonProps:t,okType:n,okTextLocale:i,onOk:o}=tr(Hi);return er.createElement(Ct,Object.assign({},_t(n),{loading:e,onClick:o},t),i)},ir=window.React;function or(e,t){return ir.createElement("span",{className:`${e}-close-x`},t||ir.createElement(wt,{className:`${e}-close-icon`}))}const rr=e=>{const{okText:t,okType:n="primary",cancelText:i,confirmLoading:o,onOk:r,onCancel:a,okButtonProps:s,cancelButtonProps:l,footer:c}=e,[u]=F("Modal",U()),d={confirmLoading:o,okButtonProps:s,cancelButtonProps:l,okTextLocale:t||(null==u?void 0:u.okText),cancelTextLocale:i||(null==u?void 0:u.cancelText),okType:n,onOk:r,onCancel:a},h=ir.useMemo((()=>d),$(Object.values(d)));let p;return"function"==typeof c||void 0===c?(p=ir.createElement(ir.Fragment,null,ir.createElement(Jo,null),ir.createElement(nr,null)),"function"==typeof c&&(p=c(p,{OkBtn:nr,CancelBtn:Jo})),p=ir.createElement(Pi,{value:h},p)):p=c,ir.createElement(Y,{disabled:!1},p)};function ar(e){return{position:e,inset:0}}const sr=e=>{const{componentCls:t,antCls:n}=e;return[{[`${t}-root`]:{[`${t}${n}-zoom-enter, ${t}${n}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${t}${n}-zoom-leave ${t}-content`]:{pointerEvents:"none"},[`${t}-mask`]:Object.assign(Object.assign({},ar("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",[`${t}-hidden`]:{display:"none"}}),[`${t}-wrap`]:Object.assign(Object.assign({},ar("fixed")),{zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${t}-root`]:Z(e)}]},lr=e=>{const{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl"},[`${t}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:`${a(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:Object.assign(Object.assign({},r(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${a(e.calc(e.margin).mul(2).equal())})`,margin:"0 auto",paddingBottom:e.paddingLG,[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:"break-word"},[`${t}-content`]:{position:"relative",backgroundColor:e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:"auto",padding:e.contentPadding},[`${t}-close`]:Object.assign({position:"absolute",top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"flex",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:a(e.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:e.colorBgTextActive}},q(e)),[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word",padding:e.bodyPadding,[`${t}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${a(e.margin)} auto`}},[`${t}-footer`]:{textAlign:"end",background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`> ${e.antCls}-btn + ${e.antCls}-btn`]:{marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:"hidden"}})},{[`${t}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${t}-content,\n ${t}-body,\n ${t}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${t}-confirm-body`]:{marginBottom:"auto"}}}]},cr=e=>{const{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},ur=e=>{const{componentCls:t}=e,n=K(e),i=Object.assign({},n);delete i.xs;const o=`--${t.replace(".","")}-`,r=Object.keys(i).map((e=>({[`@media (min-width: ${a(i[e])})`]:{width:`var(${o}${e}-width)`}})));return{[`${t}-root`]:{[t]:[].concat($(Object.keys(n).map(((e,t)=>{const i=Object.keys(n)[t-1];return i?{[`${o}${e}-width`]:`var(${o}${i}-width)`}:null}))),[{width:`var(${o}xs-width)`}],$(r))}}},dr=e=>{const t=e.padding,n=e.fontSizeHeading5,i=e.lineHeightHeading5;return R(e,{modalHeaderHeight:e.calc(e.calc(i).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},hr=e=>({footerBg:"transparent",headerBg:e.colorBgElevated,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${a(e.paddingMD)} ${a(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${a(e.padding)} ${a(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${a(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${a(e.paddingXS)} ${a(e.padding)}`:0,footerBorderTop:e.wireframe?`${a(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",footerBorderRadius:e.wireframe?`0 0 ${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${a(2*e.padding)} ${a(2*e.padding)} ${a(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM}),pr=o("Modal",(e=>{const t=dr(e);return[lr(t),cr(t),sr(t),G(t,"zoom"),ur(t)]}),hr,{unitless:{titleLineHeight:!0}});var mr=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{gr={x:e.pageX,y:e.pageY},setTimeout((()=>{gr=null}),100)}),!0);const yr=e=>{const{prefixCls:t,className:n,rootClassName:i,open:o,wrapClassName:r,centered:a,getContainer:s,focusTriggerAfterClose:c=!0,style:d,visible:h,width:p=520,footer:m,classNames:f,styles:g,children:y,loading:v,confirmLoading:b,zIndex:w,mousePosition:x,onOk:C,onCancel:_,destroyOnHidden:S,destroyOnClose:k,panelRef:E=null}=e,$=mr(e,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","focusTriggerAfterClose","style","visible","width","footer","classNames","styles","children","loading","confirmLoading","zIndex","mousePosition","onOk","onCancel","destroyOnHidden","destroyOnClose","panelRef"]),{getPopupContainer:R,getPrefixCls:A,direction:O,modal:N}=fr.useContext(j),L=e=>{b||null==_||_(e)},I=A("modal",t),D=A(),H=T(I),[P,z,F]=pr(I,H),V=l(r,{[`${I}-centered`]:null!=a?a:null==N?void 0:N.centered,[`${I}-wrap-rtl`]:"rtl"===O}),B=null===m||v?null:fr.createElement(rr,Object.assign({},e,{onOk:e=>{null==C||C(e)},onCancel:L})),[W,U,Y,Z]=vo(fo(e),fo(N),{closable:!0,closeIcon:fr.createElement(wt,{className:`${I}-close-icon`}),closeIconRender:e=>or(I,e)}),G=function(e){const t=Go.useContext(Ko),n=Go.useRef(null);return M((i=>{if(i){const o=e?i.querySelector(e):i;t.add(o),n.current=o}else t.remove(n.current)}))}(`.${I}-content`),q=u(E,G),[K,te]=Q("Modal",w),[ne,ie]=fr.useMemo((()=>p&&"object"==typeof p?[void 0,p]:[p,void 0]),[p]),oe=fr.useMemo((()=>{const e={};return ie&&Object.keys(ie).forEach((t=>{const n=ie[t];void 0!==n&&(e[`--${I}-${t}-width`]="number"==typeof n?`${n}px`:n)})),e}),[ie]);return P(fr.createElement(X,{form:!0,space:!0},fr.createElement(J.Provider,{value:te},fr.createElement(po,Object.assign({width:ne},$,{zIndex:K,getContainer:void 0===s?R:s,prefixCls:I,rootClassName:l(z,i,F,H),footer:B,visible:null!=o?o:h,mousePosition:null!=x?x:gr,onClose:L,closable:W?Object.assign({disabled:Y,closeIcon:U},Z):W,closeIcon:U,focusTriggerAfterClose:c,transitionName:ee(D,"zoom",e.transitionName),maskTransitionName:ee(D,"fade",e.maskTransitionName),className:l(z,n,null==N?void 0:N.className),style:Object.assign(Object.assign(Object.assign({},null==N?void 0:N.style),d),oe),classNames:Object.assign(Object.assign(Object.assign({},null==N?void 0:N.classNames),f),{wrapper:l(V,null==f?void 0:f.wrapper)}),styles:Object.assign(Object.assign({},null==N?void 0:N.styles),g),panelRef:q,destroyOnClose:null!=S?S:k}),v?fr.createElement(Zo,{active:!0,title:!1,paragraph:{rows:4},className:`${I}-body-skeleton`}):y))))},vr=te(["Modal","confirm"],(e=>(e=>{const{componentCls:t,titleFontSize:n,titleLineHeight:i,modalConfirmIconSize:o,fontSize:r,lineHeight:s,modalTitleHeight:l,fontHeight:c,confirmBodyPadding:u}=e,d=`${t}-confirm`;return{[d]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${d}-body-wrapper`]:Object.assign({},ne()),[`&${t} ${t}-body`]:{padding:u},[`${d}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e.iconCls}`]:{flex:"none",fontSize:o,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(c).sub(o).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(l).sub(o).equal()).div(2).equal()}},[`${d}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:e.marginXS,maxWidth:`calc(100% - ${a(e.marginSM)})`},[`${e.iconCls} + ${d}-paragraph`]:{maxWidth:`calc(100% - ${a(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${d}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:i},[`${d}-content`]:{color:e.colorText,fontSize:r,lineHeight:s},[`${d}-btns`]:{textAlign:"end",marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${d}-error ${d}-body > ${e.iconCls}`]:{color:e.colorError},[`${d}-warning ${d}-body > ${e.iconCls},\n ${d}-confirm ${d}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${d}-info ${d}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${d}-success ${d}-body > ${e.iconCls}`]:{color:e.colorSuccess}}})(dr(e))),hr,{order:-1e3});var br=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);oC),$(Object.values(C))),S=wr.createElement(wr.Fragment,null,wr.createElement(Vi,null),wr.createElement(Ui,null)),k=void 0!==e.title&&null!==e.title,E=`${r}-body`;return wr.createElement("div",{className:`${r}-body-wrapper`},wr.createElement("div",{className:l(E,{[`${E}-has-title`]:k})},f,wr.createElement("div",{className:`${r}-paragraph`},k&&wr.createElement("span",{className:`${r}-title`},e.title),wr.createElement("div",{className:`${r}-content`},e.content))),void 0===c||"function"==typeof c?wr.createElement(Pi,{value:_},wr.createElement("div",{className:`${r}-btns`},"function"==typeof c?c(S,{OkBtn:Ui,CancelBtn:Vi}):S)):c,wr.createElement(vr,{prefixCls:t}))}const Cr=e=>{const{close:t,zIndex:n,maskStyle:i,direction:o,prefixCls:r,wrapClassName:a,rootPrefixCls:s,bodyStyle:c,closable:u=!1,onConfirm:d,styles:h}=e,p=`${r}-confirm`,m=e.width||416,f=e.style||{},g=void 0===e.mask||e.mask,y=void 0!==e.maskClosable&&e.maskClosable,v=l(p,`${p}-${e.type}`,{[`${p}-rtl`]:"rtl"===o},e.className),[,b]=oe(),w=wr.useMemo((()=>void 0!==n?n:b.zIndexPopupBase+O),[n,b]);return wr.createElement(yr,Object.assign({},e,{className:v,wrapClassName:l({[`${p}-centered`]:!!e.centered},a),onCancel:()=>{null==t||t({triggerCancel:!0}),null==d||d(!1)},title:"",footer:null,transitionName:ee(s||"","zoom",e.transitionName),maskTransitionName:ee(s||"","fade",e.maskTransitionName),mask:g,maskClosable:y,style:f,styles:Object.assign({body:c,mask:i},h),width:m,zIndex:w,closable:u}),wr.createElement(xr,Object.assign({},e,{confirmPrefixCls:p})))},_r=e=>{const{rootPrefixCls:t,iconPrefixCls:n,direction:i,theme:o}=e;return wr.createElement(ie,{prefixCls:t,iconPrefixCls:n,direction:i,theme:o},wr.createElement(Cr,Object.assign({},e)))},Sr=[],kr=window.React,Er=window.React.useContext;let $r="";function Mr(){return $r}const Rr=e=>{var t,n;const{prefixCls:i,getContainer:o,direction:r}=e,a=U(),s=Er(j),l=Mr()||s.getPrefixCls(),c=i||`${l}-modal`;let u=o;return!1===u&&(u=void 0),kr.createElement(_r,Object.assign({},e,{rootPrefixCls:l,prefixCls:c,iconPrefixCls:s.iconPrefixCls,theme:s.theme,direction:null!=r?r:s.direction,locale:null!==(n=null===(t=s.locale)||void 0===t?void 0:t.Modal)&&void 0!==n?n:a,getContainer:u}))};function Ar(e){const t=re(),n=document.createDocumentFragment();let i,o,r=Object.assign(Object.assign({},e),{close:l,open:!0});function a(...t){var n,i;t.some((e=>null==e?void 0:e.triggerCancel))&&(null===(n=e.onCancel)||void 0===n||(i=n).call.apply(i,[e,()=>{}].concat($(t.slice(1)))));for(let e=0;e{const i=t.getPrefixCls(void 0,Mr()),r=t.getIconPrefixCls(),a=t.getTheme(),s=kr.createElement(Rr,Object.assign({},e)),l=kt();o=l(kr.createElement(ie,{prefixCls:i,iconPrefixCls:r,theme:a},t.holderRender?t.holderRender(s):s),n)}))}function l(...t){r=Object.assign(Object.assign({},r),{open:!1,afterClose:()=>{"function"==typeof e.afterClose&&e.afterClose(),a.apply(this,t)}}),r.visible&&delete r.visible,s(r)}return s(r),Sr.push(l),{destroy:l,update:function(e){r="function"==typeof e?e(r):Object.assign(Object.assign({},r),e),s(r)}}}function Or(e){return Object.assign(Object.assign({},e),{type:"warning"})}function jr(e){return Object.assign(Object.assign({},e),{type:"info"})}function Tr(e){return Object.assign(Object.assign({},e),{type:"success"})}function Nr(e){return Object.assign(Object.assign({},e),{type:"error"})}function Lr(e){return Object.assign(Object.assign({},e),{type:"confirm"})}var Ir=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{var n,{afterClose:i,config:o}=e,r=Ir(e,["afterClose","config"]);const[a,s]=Dr.useState(!0),[l,c]=Dr.useState(o),{direction:u,getPrefixCls:d}=Dr.useContext(j),h=d("modal"),p=d(),m=(...e)=>{var t,n;s(!1),e.some((e=>null==e?void 0:e.triggerCancel))&&(null===(t=l.onCancel)||void 0===t||(n=t).call.apply(n,[l,()=>{}].concat($(e.slice(1)))))};Dr.useImperativeHandle(t,(()=>({destroy:m,update:e=>{c((t=>{const n="function"==typeof e?e(t):e;return Object.assign(Object.assign({},t),n)}))}})));const f=null!==(n=l.okCancel)&&void 0!==n?n:"confirm"===l.type,[g]=F("Modal",V.Modal);return Dr.createElement(_r,Object.assign({prefixCls:h,rootPrefixCls:p},l,{close:m,open:a,afterClose:()=>{var e;i(),null===(e=l.afterClose)||void 0===e||e.call(l)},okText:l.okText||(f?null==g?void 0:g.okText:null==g?void 0:g.justOkText),direction:l.direction||u,cancelText:l.cancelText||(null==g?void 0:g.cancelText)},r))},Pr=Dr.forwardRef(Hr),zr=window.React;let Fr=0;const Vr=zr.memo(zr.forwardRef(((e,t)=>{const[n,i]=function(){const[e,t]=Ni.useState([]);return[e,Ni.useCallback((e=>(t((t=>[].concat($(t),[e]))),()=>{t((t=>t.filter((t=>t!==e))))})),[])]}();return zr.useImperativeHandle(t,(()=>({patchElement:i})),[]),zr.createElement(zr.Fragment,null,n)}))),Br=e=>{const{componentCls:t,notificationMarginEdge:n,animationMaxHeight:i}=e,o=`${t}-notice`,r=new A("antNotificationFadeIn",{"0%":{transform:"translate3d(100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}}),a=new A("antNotificationTopFadeIn",{"0%":{top:-i,opacity:0},"100%":{top:0,opacity:1}}),s=new A("antNotificationBottomFadeIn",{"0%":{bottom:e.calc(i).mul(-1).equal(),opacity:0},"100%":{bottom:0,opacity:1}}),l=new A("antNotificationLeftFadeIn",{"0%":{transform:"translate3d(-100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}});return{[t]:{[`&${t}-top, &${t}-bottom`]:{marginInline:0,[o]:{marginInline:"auto auto"}},[`&${t}-top`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:a}},[`&${t}-bottom`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:s}},[`&${t}-topRight, &${t}-bottomRight`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:r}},[`&${t}-topLeft, &${t}-bottomLeft`]:{marginRight:{value:0,_skip_check_:!0},marginLeft:{value:n,_skip_check_:!0},[o]:{marginInlineEnd:"auto",marginInlineStart:0},[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:l}}}}},Wr=["top","topLeft","topRight","bottom","bottomLeft","bottomRight"],Ur={topLeft:"left",topRight:"right",bottomLeft:"left",bottomRight:"right",top:"left",bottom:"left"},Yr=e=>{const t={};for(let n=1;n ${e.componentCls}-notice`]:{opacity:0,transition:`opacity ${e.motionDurationMid}`}};return Object.assign({[`&:not(:nth-last-child(-n+${e.notificationStackLayer}))`]:{opacity:0,overflow:"hidden",color:"transparent",pointerEvents:"none"}},t)},Zr=e=>{const t={};for(let n=1;n{const{componentCls:t}=e;return Object.assign({[`${t}-stack`]:{[`& > ${t}-notice-wrapper`]:Object.assign({transition:`transform ${e.motionDurationSlow}, backdrop-filter 0s`,willChange:"transform, opacity",position:"absolute"},Yr(e))},[`${t}-stack:not(${t}-stack-expanded)`]:{[`& > ${t}-notice-wrapper`]:Object.assign({},Zr(e))},[`${t}-stack${t}-stack-expanded`]:{[`& > ${t}-notice-wrapper`]:{"&:not(:nth-last-child(-n + 1))":{opacity:1,overflow:"unset",color:"inherit",pointerEvents:"auto",[`& > ${e.componentCls}-notice`]:{opacity:1}},"&:after":{content:'""',position:"absolute",height:e.margin,width:"100%",insetInline:0,bottom:e.calc(e.margin).mul(-1).equal(),background:"transparent",pointerEvents:"auto"}}}},Wr.map((t=>((e,t)=>{const{componentCls:n}=e;return{[`${n}-${t}`]:{[`&${n}-stack > ${n}-notice-wrapper`]:{[t.startsWith("top")?"top":"bottom"]:0,[Ur[t]]:{value:0,_skip_check_:!0}}}}})(e,t))).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{}))},qr=e=>{const{iconCls:t,componentCls:n,boxShadow:i,fontSizeLG:o,notificationMarginBottom:r,borderRadiusLG:s,colorSuccess:l,colorInfo:c,colorWarning:u,colorError:d,colorTextHeading:h,notificationBg:p,notificationPadding:m,notificationMarginEdge:f,notificationProgressBg:g,notificationProgressHeight:y,fontSize:v,lineHeight:b,width:w,notificationIconSize:x,colorText:C}=e,_=`${n}-notice`;return{position:"relative",marginBottom:r,marginInlineStart:"auto",background:p,borderRadius:s,boxShadow:i,[_]:{padding:m,width:w,maxWidth:`calc(100vw - ${a(e.calc(f).mul(2).equal())})`,overflow:"hidden",lineHeight:b,wordWrap:"break-word"},[`${_}-message`]:{color:h,fontSize:o,lineHeight:e.lineHeightLG},[`${_}-description`]:{fontSize:v,color:C,marginTop:e.marginXS},[`${_}-closable ${_}-message`]:{paddingInlineEnd:e.paddingLG},[`${_}-with-icon ${_}-message`]:{marginInlineStart:e.calc(e.marginSM).add(x).equal(),fontSize:o},[`${_}-with-icon ${_}-description`]:{marginInlineStart:e.calc(e.marginSM).add(x).equal(),fontSize:v},[`${_}-icon`]:{position:"absolute",fontSize:x,lineHeight:1,[`&-success${t}`]:{color:l},[`&-info${t}`]:{color:c},[`&-warning${t}`]:{color:u},[`&-error${t}`]:{color:d}},[`${_}-close`]:Object.assign({position:"absolute",top:e.notificationPaddingVertical,insetInlineEnd:e.notificationPaddingHorizontal,color:e.colorIcon,outline:"none",width:e.notificationCloseButtonSize,height:e.notificationCloseButtonSize,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none","&:hover":{color:e.colorIconHover,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},q(e)),[`${_}-progress`]:{position:"absolute",display:"block",appearance:"none",inlineSize:`calc(100% - ${a(s)} * 2)`,left:{_skip_check_:!0,value:s},right:{_skip_check_:!0,value:s},bottom:0,blockSize:y,border:0,"&, &::-webkit-progress-bar":{borderRadius:s,backgroundColor:"rgba(0, 0, 0, 0.04)"},"&::-moz-progress-bar":{background:g},"&::-webkit-progress-value":{borderRadius:s,background:g}},[`${_}-actions`]:{float:"right",marginTop:e.marginSM}}},Kr=e=>{const{componentCls:t,notificationMarginBottom:n,notificationMarginEdge:i,motionDurationMid:o,motionEaseInOut:a}=e,s=`${t}-notice`,l=new A("antNotificationFadeOut",{"0%":{maxHeight:e.animationMaxHeight,marginBottom:n},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[t]:Object.assign(Object.assign({},r(e)),{position:"fixed",zIndex:e.zIndexPopup,marginRight:{value:i,_skip_check_:!0},[`${t}-hook-holder`]:{position:"relative"},[`${t}-fade-appear-prepare`]:{opacity:"0 !important"},[`${t}-fade-enter, ${t}-fade-appear`]:{animationDuration:e.motionDurationMid,animationTimingFunction:a,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${t}-fade-leave`]:{animationTimingFunction:a,animationFillMode:"both",animationDuration:o,animationPlayState:"paused"},[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationPlayState:"running"},[`${t}-fade-leave${t}-fade-leave-active`]:{animationName:l,animationPlayState:"running"},"&-rtl":{direction:"rtl",[`${s}-actions`]:{float:"left"}}})},{[t]:{[`${s}-wrapper`]:Object.assign({},qr(e))}}]},Qr=e=>({zIndexPopup:e.zIndexPopupBase+O+50,width:384}),Xr=e=>{const t=e.paddingMD,n=e.paddingLG;return R(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:n,notificationIconSize:e.calc(e.fontSizeLG).mul(e.lineHeightLG).equal(),notificationCloseButtonSize:e.calc(e.controlHeightLG).mul(.55).equal(),notificationMarginBottom:e.margin,notificationPadding:`${a(e.paddingMD)} ${a(e.paddingContentHorizontalLG)}`,notificationMarginEdge:e.marginLG,animationMaxHeight:150,notificationStackLayer:3,notificationProgressHeight:2,notificationProgressBg:`linear-gradient(90deg, ${e.colorPrimaryBorderHover}, ${e.colorPrimary})`})},Jr=o("Notification",(e=>{const t=Xr(e);return[Kr(t),Br(t),Gr(t)]}),Qr),ea=te(["Notification","PurePanel"],(e=>{const t=`${e.componentCls}-notice`,n=Xr(e);return{[`${t}-pure-panel`]:Object.assign(Object.assign({},qr(n)),{width:n.width,maxWidth:`calc(100vw - ${a(e.calc(n.notificationMarginEdge).mul(2).equal())})`,margin:0})}}),Qr);var ta=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{prefixCls:t,icon:n,type:i,message:o,description:r,actions:a,role:s="alert"}=e;let c=null;return n?c=na.createElement("span",{className:`${t}-icon`},n):i&&(c=na.createElement(oa[i]||null,{className:l(`${t}-icon`,`${t}-icon-${i}`)})),na.createElement("div",{className:l({[`${t}-with-icon`]:c}),role:s},c,na.createElement("div",{className:`${t}-message`},o),r&&na.createElement("div",{className:`${t}-description`},r),a&&na.createElement("div",{className:`${t}-actions`},a))};var aa=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const n=T(t),[i,o,r]=Jr(t,n);return i(sa.createElement(oi,{classNames:{list:l(o,r,n)}},e))},ua=(e,{prefixCls:t,key:n})=>sa.createElement(ca,{prefixCls:t,key:n},e),da=sa.forwardRef(((e,t)=>{const{top:n,bottom:i,prefixCls:o,getContainer:r,maxCount:a,rtl:s,onAllRemoved:c,stack:u,duration:d,pauseOnHover:h=!0,showProgress:p}=e,{getPrefixCls:m,getPopupContainer:f,notification:g,direction:y}=la(j),[,v]=oe(),b=o||m("notification"),[w,x]=bi({prefixCls:b,style:e=>function(e,t,n){let i;switch(e){case"top":i={left:"50%",transform:"translateX(-50%)",right:"auto",top:t,bottom:"auto"};break;case"topLeft":i={left:0,top:t,bottom:"auto"};break;case"topRight":i={right:0,top:t,bottom:"auto"};break;case"bottom":i={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case"bottomLeft":i={left:0,top:"auto",bottom:n};break;default:i={right:0,top:"auto",bottom:n}}return i}(e,null!=n?n:24,null!=i?i:24),className:()=>l({[`${b}-rtl`]:null!=s?s:"rtl"===y}),motion:()=>function(e){return{motionName:`${e}-fade`}}(b),closable:!0,closeIcon:ia(b),duration:null!=d?d:4.5,getContainer:()=>(null==r?void 0:r())||(null==f?void 0:f())||document.body,maxCount:a,pauseOnHover:h,showProgress:p,onAllRemoved:c,renderNotifications:ua,stack:!1!==u&&{threshold:"object"==typeof u?null==u?void 0:u.threshold:void 0,offset:8,gap:v.margin}});return sa.useImperativeHandle(t,(()=>Object.assign(Object.assign({},w),{prefixCls:b,notification:g}))),x}));function ha(e){const t=sa.useRef(null);return L(),[sa.useMemo((()=>{const n=n=>{var i;if(!t.current)return;const{open:o,prefixCls:r,notification:a}=t.current,s=`${r}-notice`,{message:c,description:u,icon:d,type:h,btn:p,actions:m,className:f,style:g,role:y="alert",closeIcon:v,closable:b}=n,w=aa(n,["message","description","icon","type","btn","actions","className","style","role","closeIcon","closable"]),x=null!=m?m:p,C=ia(s,function(e,t,n){return void 0!==e?e:void 0!==(null==t?void 0:t.closeIcon)?t.closeIcon:null==n?void 0:n.closeIcon}(v,e,a));return o(Object.assign(Object.assign({placement:null!==(i=null==e?void 0:e.placement)&&void 0!==i?i:"topRight"},w),{content:sa.createElement(ra,{prefixCls:s,icon:d,type:h,message:c,description:u,actions:x,role:y}),className:l(h&&`${s}-${h}`,f,null==a?void 0:a.className),style:Object.assign(Object.assign({},null==a?void 0:a.style),g),closeIcon:C,closable:null!=b?b:!!C}))},i={open:n,destroy:e=>{var n,i;void 0!==e?null===(n=t.current)||void 0===n||n.close(e):null===(i=t.current)||void 0===i||i.destroy()}};return["success","info","warning","error"].forEach((e=>{i[e]=t=>n(Object.assign(Object.assign({},t),{type:e}))})),i}),[]),sa.createElement(da,Object.assign({key:"notification-holder"},e,{ref:t}))]}const pa=window.React.createContext({}),ma=e=>e?"function"==typeof e?e():e:null,fa=e=>{const{componentCls:t,popoverColor:n,titleMinWidth:i,fontWeightStrong:o,innerPadding:a,boxShadowSecondary:s,colorTextHeading:l,borderRadiusLG:c,zIndexPopup:u,titleMarginBottom:d,colorBgElevated:h,popoverBg:p,titleBorderBottom:m,innerContentPadding:f,titlePadding:g}=e;return[{[t]:Object.assign(Object.assign({},r(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:u,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"--antd-arrow-background-color":h,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:p,backgroundClip:"padding-box",borderRadius:c,boxShadow:s,padding:a},[`${t}-title`]:{minWidth:i,marginBottom:d,color:l,fontWeight:o,borderBottom:m,padding:g},[`${t}-inner-content`]:{color:n,padding:f}})},ae(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]},ga=e=>{const{componentCls:t}=e;return{[t]:se.map((n=>{const i=e[`${n}6`];return{[`&${t}-${n}`]:{"--antd-arrow-background-color":i,[`${t}-inner`]:{backgroundColor:i},[`${t}-arrow`]:{background:"transparent"}}}}))}},ya=o("Popover",(e=>{const{colorBgElevated:t,colorText:n}=e,i=R(e,{popoverBg:t,popoverColor:n});return[fa(i),ga(i),G(i,"zoom-big")]}),(e=>{const{lineWidth:t,controlHeight:n,fontHeight:i,padding:o,wireframe:r,zIndexPopupBase:a,borderRadiusLG:s,marginXS:l,lineType:c,colorSplit:u,paddingSM:d}=e,h=n-i,p=h/2,m=h/2-t,f=o;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:a+30},le(e)),ce({contentRadius:s,limitVerticalRadius:!0})),{innerPadding:r?0:12,titleMarginBottom:r?0:l,titlePadding:r?`${p}px ${f}px ${m}px`:0,titleBorderBottom:r?`${t}px ${c} ${u}`:"none",innerContentPadding:r?`${d}px ${f}px`:0})}),{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var va=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);oe||t?ba.createElement(ba.Fragment,null,e&&ba.createElement("div",{className:`${n}-title`},e),t&&ba.createElement("div",{className:`${n}-inner-content`},t)):null,xa=e=>{const{hashId:t,prefixCls:n,className:i,style:o,placement:r="top",title:a,content:s,children:c}=e,u=ma(a),d=ma(s),h=l(t,n,`${n}-pure`,`${n}-placement-${r}`,i);return ba.createElement("div",{className:h,style:o},ba.createElement("div",{className:`${n}-arrow`}),ba.createElement(ue,Object.assign({},e,{className:t,prefixCls:n}),c||ba.createElement(wa,{prefixCls:n,title:u,content:d})))};var Ca=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{var n,i;const{prefixCls:o,title:r,content:a,overlayClassName:c,placement:u="top",trigger:d="hover",children:h,mouseEnterDelay:p=.1,mouseLeaveDelay:m=.1,onOpenChange:f,overlayStyle:g={},styles:y,classNames:v}=e,b=Ca(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:w,className:x,style:C,classNames:_,styles:S}=s("popover"),k=w("popover",o),[E,$,M]=ya(k),R=w(),A=l(c,$,M,x,_.root,null==v?void 0:v.root),O=l(_.body,null==v?void 0:v.body),[j,T]=de(!1,{value:null!==(n=e.open)&&void 0!==n?n:e.visible,defaultValue:null!==(i=e.defaultOpen)&&void 0!==i?i:e.defaultVisible}),N=(e,t)=>{T(e,!0),null==f||f(e,t)},L=ma(r),I=ma(a);return E(_a.createElement(he,Object.assign({placement:u,trigger:d,mouseEnterDelay:p,mouseLeaveDelay:m},b,{prefixCls:k,classNames:{root:A,body:O},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},S.root),C),g),null==y?void 0:y.root),body:Object.assign(Object.assign({},S.body),null==y?void 0:y.body)},ref:t,open:j,onOpenChange:e=>{N(e)},overlay:L||I?_a.createElement(wa,{prefixCls:k,title:L,content:I}):null,transitionName:ee(R,"zoom-big",b.transitionName),"data-popover-inject":!0}),pe(h,{onKeyDown:e=>{var t,n;Sa(h)&&(null===(n=null==h?void 0:(t=h.props).onKeyDown)||void 0===n||n.call(t,e)),(e=>{e.keyCode===xt.ESC&&N(!1,e)})(e)}})))}));ka._InternalPanelDoNotUseOrYouWillBeFired=e=>{const{prefixCls:t,className:n}=e,i=va(e,["prefixCls","className"]),{getPrefixCls:o}=ba.useContext(j),r=o("popover",t),[a,s,c]=ya(r);return a(ba.createElement(xa,Object.assign({},i,{prefixCls:r,hashId:s,className:l(n,c)})))};const Ea=ka,$a=new A("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),Ma=new A("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),Ra=new A("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),Aa=new A("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),Oa=new A("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),ja=new A("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),Ta=e=>{const{fontHeight:t,lineWidth:n,marginXS:i,colorBorderBg:o}=e,r=t,a=n,s=e.colorTextLightSolid,l=e.colorError,c=e.colorErrorHover;return R(e,{badgeFontHeight:r,badgeShadowSize:a,badgeTextColor:s,badgeColor:l,badgeColorHover:c,badgeShadowColor:o,badgeProcessingDuration:"1.2s",badgeRibbonOffset:i,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},Na=e=>{const{fontSize:t,lineHeight:n,fontSizeSM:i,lineWidth:o}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*n)-2*o,indicatorHeightSM:t,dotSize:i/2,textFontSize:i,textFontSizeSM:i,textFontWeight:"normal",statusSize:i/2}},La=o("Badge",(e=>(e=>{const{componentCls:t,iconCls:n,antCls:i,badgeShadowSize:o,textFontSize:s,textFontSizeSM:l,statusSize:c,dotSize:u,textFontWeight:d,indicatorHeight:h,indicatorHeightSM:p,marginXS:m,calc:f}=e,g=`${i}-scroll-number`,y=me(e,((e,{darkColor:n})=>({[`&${t} ${t}-color-${e}`]:{background:n,[`&:not(${t}-count)`]:{color:n},"a:hover &":{background:n}}})));return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},r(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:h,height:h,color:e.badgeTextColor,fontWeight:d,fontSize:s,lineHeight:a(h),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:f(h).div(2).equal(),boxShadow:`0 0 0 ${a(o)} ${e.badgeShadowColor}`,transition:`background ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:p,height:p,fontSize:l,lineHeight:a(p),borderRadius:f(p).div(2).equal()},[`${t}-multiple-words`]:{padding:`0 ${a(e.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${t}-dot`]:{zIndex:e.indicatorZIndex,width:u,minWidth:u,height:u,background:e.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${a(o)} ${e.badgeShadowColor}`},[`${t}-count, ${t}-dot, ${g}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${n}-spin`]:{animationName:ja,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${t}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${t}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:c,height:c,verticalAlign:"middle",borderRadius:"50%"},[`${t}-status-success`]:{backgroundColor:e.colorSuccess},[`${t}-status-processing`]:{overflow:"visible",color:e.colorInfo,backgroundColor:e.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:o,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:$a,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${t}-status-default`]:{backgroundColor:e.colorTextPlaceholder},[`${t}-status-error`]:{backgroundColor:e.colorError},[`${t}-status-warning`]:{backgroundColor:e.colorWarning},[`${t}-status-text`]:{marginInlineStart:m,color:e.colorText,fontSize:e.fontSize}}}),y),{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:Ma,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:Ra,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:Aa,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:Oa,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:"middle"},[`${g}-custom-component, ${t}-count`]:{transform:"none"},[`${g}-custom-component, ${g}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[g]:{overflow:"hidden",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack}`,[`${g}-only`]:{position:"relative",display:"inline-block",height:h,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${g}-only-unit`]:{height:h,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${g}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${g}-custom-component`]:{transform:"translate(-50%, -50%)"}}})}})(Ta(e))),Na),Ia=o(["Badge","Ribbon"],(e=>(e=>{const{antCls:t,badgeFontHeight:n,marginXS:i,badgeRibbonOffset:o,calc:s}=e,l=`${t}-ribbon`,c=`${t}-ribbon-wrapper`,u=me(e,((e,{darkColor:t})=>({[`&${l}-color-${e}`]:{background:t,color:t}})));return{[c]:{position:"relative"},[l]:Object.assign(Object.assign(Object.assign(Object.assign({},r(e)),{position:"absolute",top:i,padding:`0 ${a(e.paddingXS)}`,color:e.colorPrimary,lineHeight:a(n),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${l}-text`]:{color:e.badgeTextColor},[`${l}-corner`]:{position:"absolute",top:"100%",width:o,height:o,color:"currentcolor",border:`${a(s(o).div(2).equal())} solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),u),{[`&${l}-placement-end`]:{insetInlineEnd:s(o).mul(-1).equal(),borderEndEndRadius:0,[`${l}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${l}-placement-start`]:{insetInlineStart:s(o).mul(-1).equal(),borderEndStartRadius:0,[`${l}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}})(Ta(e))),Na),Da=window.React,Ha=window.React,Pa=e=>{const{prefixCls:t,value:n,current:i,offset:o=0}=e;let r;return o&&(r={position:"absolute",top:`${o}00%`,left:0}),Ha.createElement("span",{style:r,className:l(`${t}-only-unit`,{current:i})},n)};function za(e,t,n){let i=e,o=0;for(;(i+10)%10!==t;)i+=n,o+=n;return o}const Fa=e=>{const{prefixCls:t,count:n,value:i}=e,o=Number(i),r=Math.abs(n),[a,s]=Ha.useState(o),[l,c]=Ha.useState(r),u=()=>{s(o),c(r)};let d,h;if(Ha.useEffect((()=>{const e=setTimeout(u,1e3);return()=>clearTimeout(e)}),[o]),a===o||Number.isNaN(o)||Number.isNaN(a))d=[Ha.createElement(Pa,Object.assign({},e,{key:o,current:!0}))],h={transition:"none"};else{d=[];const t=o+10,n=[];for(let e=o;e<=t;e+=1)n.push(e);const i=le%10===a));d=(i<0?n.slice(0,s+1):n.slice(s)).map(((t,n)=>{const o=t%10;return Ha.createElement(Pa,Object.assign({},e,{key:t,value:o,offset:i<0?n-s:n,current:n===s}))})),h={transform:`translateY(${-za(a,o,i)}00%)`}}return Ha.createElement("span",{className:`${t}-only`,style:h,onTransitionEnd:u},d)};var Va=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{prefixCls:n,count:i,className:o,motionClassName:r,style:a,title:s,show:c,component:u="sup",children:d}=e,h=Va(e,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:p}=Ba.useContext(j),m=p("scroll-number",n),f=Object.assign(Object.assign({},h),{"data-show":c,style:a,className:l(m,o,r),title:s});let g=i;if(i&&Number(i)%1==0){const e=String(i).split("");g=Ba.createElement("bdi",null,e.map(((t,n)=>Ba.createElement(Fa,{prefixCls:m,count:Number(i),value:t,key:e.length-n}))))}return(null==a?void 0:a.borderColor)&&(f.style=Object.assign(Object.assign({},a),{boxShadow:`0 0 0 1px ${a.borderColor} inset`})),d?pe(d,(e=>({className:l(`${m}-custom-component`,null==e?void 0:e.className,r)}))):Ba.createElement(u,Object.assign({},f,{ref:t}),g)}));var Ua=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{var n,i,o,r,a;const{prefixCls:s,scrollNumberPrefixCls:u,children:d,status:h,text:p,color:m,count:f=null,overflowCount:g=99,dot:y=!1,size:v="default",title:b,offset:w,style:x,className:C,rootClassName:_,classNames:S,styles:k,showZero:E=!1}=e,$=Ua(e,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:M,direction:R,badge:A}=Ya.useContext(j),O=M("badge",s),[T,N,L]=La(O),I=f>g?`${g}+`:f,D="0"===I||0===I||"0"===p||0===p,H=null===f||D&&!E,P=(null!=h||null!=m)&&H,z=null!=h||!D,F=y&&!D,V=F?"":I,B=Za((()=>(!(null!=V&&""!==V||null!=p&&""!==p)||D&&!E)&&!F),[V,D,E,F,p]),W=Ga(f);B||(W.current=f);const U=W.current,Y=Ga(V);B||(Y.current=V);const Z=Y.current,G=Ga(F);B||(G.current=F);const q=Za((()=>{if(!w)return Object.assign(Object.assign({},null==A?void 0:A.style),x);const e={marginTop:w[1]};return"rtl"===R?e.left=parseInt(w[0],10):e.right=-parseInt(w[0],10),Object.assign(Object.assign(Object.assign({},e),null==A?void 0:A.style),x)}),[R,w,x,null==A?void 0:A.style]),K=null!=b?b:"string"==typeof U||"number"==typeof U?U:void 0,Q=!B&&(0===p?E:!!p&&!0!==p),X=Q?Ya.createElement("span",{className:`${O}-status-text`},p):null,J=U&&"object"==typeof U?pe(U,(e=>({style:Object.assign(Object.assign({},q),e.style)}))):void 0,ee=fe(m,!1),te=l(null==S?void 0:S.indicator,null===(n=null==A?void 0:A.classNames)||void 0===n?void 0:n.indicator,{[`${O}-status-dot`]:P,[`${O}-status-${h}`]:!!h,[`${O}-color-${m}`]:ee}),ne={};m&&!ee&&(ne.color=m,ne.background=m);const ie=l(O,{[`${O}-status`]:P,[`${O}-not-a-wrapper`]:!d,[`${O}-rtl`]:"rtl"===R},C,_,null==A?void 0:A.className,null===(i=null==A?void 0:A.classNames)||void 0===i?void 0:i.root,null==S?void 0:S.root,N,L);if(!d&&P&&(p||z||!H)){const e=q.color;return T(Ya.createElement("span",Object.assign({},$,{className:ie,style:Object.assign(Object.assign(Object.assign({},null==k?void 0:k.root),null===(o=null==A?void 0:A.styles)||void 0===o?void 0:o.root),q)}),Ya.createElement("span",{className:te,style:Object.assign(Object.assign(Object.assign({},null==k?void 0:k.indicator),null===(r=null==A?void 0:A.styles)||void 0===r?void 0:r.indicator),ne)}),Q&&Ya.createElement("span",{style:{color:e},className:`${O}-status-text`},p)))}return T(Ya.createElement("span",Object.assign({ref:t},$,{className:ie,style:Object.assign(Object.assign({},null===(a=null==A?void 0:A.styles)||void 0===a?void 0:a.root),null==k?void 0:k.root)}),d,Ya.createElement(c,{visible:!B,motionName:`${O}-zoom`,motionAppear:!1,motionDeadline:1e3},(({className:e})=>{var t,n;const i=M("scroll-number",u),o=G.current,r=l(null==S?void 0:S.indicator,null===(t=null==A?void 0:A.classNames)||void 0===t?void 0:t.indicator,{[`${O}-dot`]:o,[`${O}-count`]:!o,[`${O}-count-sm`]:"small"===v,[`${O}-multiple-words`]:!o&&Z&&Z.toString().length>1,[`${O}-status-${h}`]:!!h,[`${O}-color-${m}`]:ee});let a=Object.assign(Object.assign(Object.assign({},null==k?void 0:k.indicator),null===(n=null==A?void 0:A.styles)||void 0===n?void 0:n.indicator),q);return m&&!ee&&(a=a||{},a.background=m),Ya.createElement(Wa,{prefixCls:i,show:!B,motionClassName:e,className:r,count:Z,title:K,style:a,key:"scrollNumber"},J)})),X))}));qa.Ribbon=e=>{const{className:t,prefixCls:n,style:i,color:o,children:r,text:a,placement:s="end",rootClassName:c}=e,{getPrefixCls:u,direction:d}=Da.useContext(j),h=u("ribbon",n),p=`${h}-wrapper`,[m,f,g]=Ia(h,p),y=fe(o,!1),v=l(h,`${h}-placement-${s}`,{[`${h}-rtl`]:"rtl"===d,[`${h}-color-${o}`]:y},t),b={},w={};return o&&!y&&(b.background=o,w.color=o),m(Da.createElement("div",{className:l(p,c,f,g)},r,Da.createElement("div",{className:l(v,f),style:Object.assign(Object.assign({},b),i)},Da.createElement("span",{className:`${h}-text`},a),Da.createElement("div",{className:`${h}-corner`,style:w}))))};const Ka=qa,Qa=window.React,Xa=({children:e})=>{const{getPrefixCls:t}=Qa.useContext(j),n=t("breadcrumb");return Qa.createElement("li",{className:`${n}-separator`,"aria-hidden":"true"},""===e?e:e||"/")};Xa.__ANT_BREADCRUMB_SEPARATOR=!0;const Ja=Xa;var es=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{prefixCls:t,separator:n="/",children:i,menu:o,overlay:r,dropdownProps:a,href:s}=e,l=(e=>{if(o||r){const n=Object.assign({},a);if(o){const e=o||{},{items:t}=e,i=is(e,["items"]);n.menu=Object.assign(Object.assign({},i),{items:null==t?void 0:t.map(((e,t)=>{var{key:n,title:i,label:o,path:r}=e,a=is(e,["key","title","label","path"]);let l=null!=o?o:i;return r&&(l=os.createElement("a",{href:`${s}${r}`},l)),Object.assign(Object.assign({},a),{key:null!=n?n:t,label:l})}))})}else r&&(n.overlay=r);return os.createElement(Et,Object.assign({placement:"bottom"},n),os.createElement("span",{className:`${t}-overlay-link`},e,os.createElement($t,null)))}return e})(i);return null!=l?os.createElement(os.Fragment,null,os.createElement("li",null,l),n&&os.createElement(Ja,null,n)):null},as=e=>{const{prefixCls:t,children:n,href:i}=e,o=is(e,["prefixCls","children","href"]),{getPrefixCls:r}=os.useContext(j),a=r("breadcrumb",t);return os.createElement(rs,Object.assign({},o,{prefixCls:a}),ns(a,o,n,i))};as.__ANT_BREADCRUMB_ITEM=!0;const ss=as,ls=o("Breadcrumb",(e=>(e=>{const{componentCls:t,iconCls:n,calc:i}=e;return{[t]:Object.assign(Object.assign({},r(e)),{color:e.itemColor,fontSize:e.fontSize,[n]:{fontSize:e.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:e.linkColor,transition:`color ${e.motionDurationMid}`,padding:`0 ${a(e.paddingXXS)}`,borderRadius:e.borderRadiusSM,height:e.fontHeight,display:"inline-block",marginInline:i(e.marginXXS).mul(-1).equal(),"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover}},q(e)),"li:last-child":{color:e.lastItemColor},[`${t}-separator`]:{marginInline:e.separatorMargin,color:e.separatorColor},[`${t}-link`]:{[`\n > ${n} + span,\n > ${n} + a\n `]:{marginInlineStart:e.marginXXS}},[`${t}-overlay-link`]:{borderRadius:e.borderRadiusSM,height:e.fontHeight,display:"inline-block",padding:`0 ${a(e.paddingXXS)}`,marginInline:i(e.marginXXS).mul(-1).equal(),[`> ${n}`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSizeIcon},"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover,a:{color:e.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}})}})(R(e,{}))),(e=>({itemColor:e.colorTextDescription,lastItemColor:e.colorText,iconFontSize:e.fontSize,linkColor:e.colorTextDescription,linkHoverColor:e.colorText,separatorColor:e.colorTextDescription,separatorMargin:e.marginXS})));var cs=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{var{breadcrumbName:t}=e,n=cs(e,["breadcrumbName"]);return Object.assign(Object.assign({},n),{title:t})}))}),o}var hs=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{prefixCls:t,separator:n="/",style:i,className:o,rootClassName:r,routes:a,items:s,children:c,itemRender:u,params:d={}}=e,h=hs(e,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:p,direction:m,breadcrumb:f}=ps.useContext(j);let g;const y=p("breadcrumb",t),[v,b,w]=ls(y),x=function(e,t){return us((()=>e||(t?t.map(ds):null)),[e,t])}(s,a),C=function(e,t){return(n,i,o,r,a)=>{if(t)return t(n,i,o,r);const s=function(e,t){if(void 0===e.title||null===e.title)return null;const n=Object.keys(t).join("|");return"object"==typeof e.title?e.title:String(e.title).replace(new RegExp(`:(${n})`,"g"),((e,n)=>t[n]||e))}(n,i);return ns(e,n,s,a)}}(y,u);if(x&&x.length>0){const e=[],t=s||a;g=x.map(((i,o)=>{const{path:r,key:a,type:s,menu:l,overlay:c,onClick:u,className:h,separator:p,dropdownProps:m}=i,f=((e,t)=>{if(void 0===t)return t;let n=(t||"").replace(/^\//,"");return Object.keys(e).forEach((t=>{n=n.replace(`:${t}`,e[t])})),n})(d,r);void 0!==f&&e.push(f);const g=null!=a?a:o;if("separator"===s)return ps.createElement(Ja,{key:g},p);const v={},b=o===x.length-1;l?v.menu=l:c&&(v.overlay=c);let{href:w}=i;return e.length&&void 0!==f&&(w=`#/${e.join("/")}`),ps.createElement(rs,Object.assign({key:g},v,bt(i,{data:!0,aria:!0}),{className:h,dropdownProps:m,href:w,separator:b?"":n,onClick:u,prefixCls:y}),C(i,d,t,e,w))}))}else if(c){const e=ge(c).length;g=ge(c).map(((t,i)=>t?pe(t,{separator:i===e-1?"":n,key:i}):t))}const _=l(y,null==f?void 0:f.className,{[`${y}-rtl`]:"rtl"===m},o,r,b,w),S=Object.assign(Object.assign({},null==f?void 0:f.style),i);return v(ps.createElement("nav",Object.assign({className:_,style:S},h),ps.createElement("ol",null,g)))};ms.Item=ss,ms.Separator=Ja;const fs=ms;var gs={exports:{}};gs.exports=function(){var e=6e4,t=36e5,n="millisecond",i="second",o="minute",r="hour",a="day",s="week",l="month",c="quarter",u="year",d="date",h="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|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,f={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(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),i=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(i,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()1)return e(a[0])}else{var s=t.name;b[s]=t,o=s}return!i&&o&&(v=o),o||!i&&v},_=function(e,t){if(x(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new k(n)},S=y;S.l=C,S.i=x,S.w=function(e,t){return _(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var k=function(){function f(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var g=f.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(S.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(p);if(i){var o=i[2]-1||0,r=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,r)):new Date(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,r)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return S},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(e,t){var n=_(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return _(e)25){var r=o(this).startOf(n).add(1,n).date(i),a=o(this).endOf(t);if(r.isBefore(a))return 1}var s=o(this).startOf(n).date(i).startOf(t).subtract(1,"millisecond"),l=this.diff(s,t,!0);return l<0?o(this).startOf("week").week():Math.ceil(l)},r.weeks=function(e){return void 0===e&&(e=null),this.week(e)}})}(Cs);const _s=ve(Cs.exports);var Ss={exports:{}};!function(e){e.exports=function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),n=this.year();return 1===t&&11===e?n+1:0===e&&t>=52?n-1:n}}}(Ss);const ks=ve(Ss.exports);var Es={exports:{}};!function(e){e.exports=function(e,t){var n=t.prototype,i=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return i.bind(this)(e);var o=this.$utils(),r=(e||"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(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return n.ordinal(t.$D);case"gggg":return t.weekYear();case"GGGG":return t.isoWeekYear();case"wo":return n.ordinal(t.week(),"W");case"w":case"ww":return o.s(t.week(),"w"===e?1:2,"0");case"W":case"WW":return o.s(t.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return o.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();case"z":return"["+t.offsetName()+"]";case"zzz":return"["+t.offsetName("long")+"]";default:return e}}));return i.bind(this)(r)}}}(Es);const $s=ve(Es.exports);var Ms={exports:{}};!function(e){var t,n,i,o,r,a,s,l,c,u,d,h,p;e.exports=(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"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s={},l=function(e){return(e=+e)+(e>68?1900:2e3)},u=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],d=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},h=function(e,t){var n,i=s.meridiem;if(i){for(var o=1;o<=24;o+=1)if(e.indexOf(i(o,0,t))>-1){n=o>12;break}}else n=e===(t?"pm":"PM");return n},p={A:[a=/\d*[^-_:/,()\s\d]+/,function(e){this.afternoon=h(e,!1)}],a:[a,function(e){this.afternoon=h(e,!0)}],Q:[i=/\d/,function(e){this.month=3*(e-1)+1}],S:[i,function(e){this.milliseconds=100*+e}],SS:[o=/\d\d/,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[r=/\d\d?/,(c=function(e){return function(t){this[e]=+t}})("seconds")],ss:[r,c("seconds")],m:[r,c("minutes")],mm:[r,c("minutes")],H:[r,c("hours")],h:[r,c("hours")],HH:[r,c("hours")],hh:[r,c("hours")],D:[r,c("day")],DD:[o,c("day")],Do:[a,function(e){var t=s.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var i=1;i<=31;i+=1)t(i).replace(/\[|\]/g,"")===e&&(this.day=i)}],w:[r,c("week")],ww:[o,c("week")],M:[r,c("month")],MM:[o,c("month")],MMM:[a,function(e){var t=d("months"),n=(d("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[a,function(e){var t=d("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,c("year")],YY:[o,function(e){this.year=l(e)}],YYYY:[/\d{4}/,c("year")],Z:u,ZZ:u},function(e,i,o){o.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(l=e.parseTwoDigitYear);var r=i.prototype,a=r.parse;r.parse=function(e){var i=e.date,r=e.utc,l=e.args;this.$u=r;var c=l[1];if("string"==typeof c){var u=!0===l[2],d=!0===l[3],h=u||d,m=l[2];d&&(m=l[2]),s=this.$locale(),!u&&m&&(s=o.Ls[m]),this.$d=function(e,i,o,r){try{if(["x","X"].indexOf(i)>-1)return new Date(("X"===i?1e3:1)*e);var a=function(e){var i,o;i=e,o=s&&s.formats;for(var r=(e=i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,i){var r=i&&i.toUpperCase();return n||o[i]||t[i]||o[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(n),a=r.length,l=0;l0?c-1:v.getMonth());var C,_=d||0,S=h||0,k=m||0,E=f||0;return g?new Date(Date.UTC(w,x,b,_,S,k,E+60*g.offset*1e3)):o?new Date(Date.UTC(w,x,b,_,S,k,E)):(C=new Date(w,x,b,_,S,k,E),y&&(C=r(C).week(y).toDate()),C)}catch($){return new Date("")}}(i,c,r,o),this.init(),m&&!0!==m&&(this.$L=this.locale(m).$L),h&&i!=this.format(c)&&(this.$d=new Date("")),s={}}else if(c instanceof Array)for(var f=c.length,g=1;g<=f;g+=1){l[1]=c[g-1];var y=o.apply(this,l);if(y.isValid()){this.$d=y.$d,this.$L=y.$L,this.init();break}g===f&&(this.$d=new Date(""))}else a.call(this,e)}})}(Ms);const Rs=ve(Ms.exports);ys.extend(Rs),ys.extend($s),ys.extend(bs),ys.extend(xs),ys.extend(_s),ys.extend(ks),ys.extend((function(e,t){var n=t.prototype,i=n.format;n.format=function(e){var t=(e||"").replace("Wo","wo");return i.bind(this)(t)}}));var As={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},Os=function(e){return As[e]||e.split("_")[0]},js={getNow:function(){var e=ys();return"function"==typeof e.tz?e.tz():e},getFixedDate:function(e){return ys(e,["YYYY-M-DD","YYYY-MM-DD"])},getEndDate:function(e){return e.endOf("month")},getWeekDay:function(e){var t=e.locale("en");return t.weekday()+t.localeData().firstDayOfWeek()},getYear:function(e){return e.year()},getMonth:function(e){return e.month()},getDate:function(e){return e.date()},getHour:function(e){return e.hour()},getMinute:function(e){return e.minute()},getSecond:function(e){return e.second()},getMillisecond:function(e){return e.millisecond()},addYear:function(e,t){return e.add(t,"year")},addMonth:function(e,t){return e.add(t,"month")},addDate:function(e,t){return e.add(t,"day")},setYear:function(e,t){return e.year(t)},setMonth:function(e,t){return e.month(t)},setDate:function(e,t){return e.date(t)},setHour:function(e,t){return e.hour(t)},setMinute:function(e,t){return e.minute(t)},setSecond:function(e,t){return e.second(t)},setMillisecond:function(e,t){return e.millisecond(t)},isAfter:function(e,t){return e.isAfter(t)},isValidate:function(e){return e.isValid()},locale:{getWeekFirstDay:function(e){return ys().locale(Os(e)).localeData().firstDayOfWeek()},getWeekFirstDate:function(e,t){return t.locale(Os(e)).weekday(0)},getWeek:function(e,t){return t.locale(Os(e)).week()},getShortWeekDays:function(e){return ys().locale(Os(e)).localeData().weekdaysMin()},getShortMonths:function(e){return ys().locale(Os(e)).localeData().monthsShort()},format:function(e,t,n){return t.locale(Os(e)).format(n)},parse:function(e,t,n){for(var i=Os(e),o=0;o2&&void 0!==arguments[2]?arguments[2]:"0",i=String(e);i.length2&&void 0!==arguments[2]?arguments[2]:[],i=Ys.useState([!1,!1]),o=x(i,2),r=o[0],a=o[1];return[Ys.useMemo((function(){return r.map((function(i,o){if(i)return!0;var r=e[o];return!(!r||(n[o]||r)&&(!r||!t(r,{activeIndex:o})))}))}),[e,r,t,n]),function(e,t){a((function(n){return Ps(n,t,e)}))}]}const Gs=window.React;function qs(e,t,n,i,o){var r="",a=[];return e&&a.push(o?"hh":"HH"),t&&a.push("mm"),n&&a.push("ss"),r=a.join(":"),i&&(r+=".SSS"),o&&(r+=" A"),r}function Ks(e,t){var n=t.showHour,i=t.showMinute,o=t.showSecond,r=t.showMillisecond,a=t.use12Hours;return Gs.useMemo((function(){return function(e,t,n,i,o,r){var a=e.fieldDateTimeFormat,s=e.fieldDateFormat,l=e.fieldTimeFormat,c=e.fieldMonthFormat,u=e.fieldYearFormat,d=e.fieldWeekFormat,h=e.fieldQuarterFormat,p=e.yearFormat,m=e.cellYearFormat,f=e.cellQuarterFormat,g=e.dayFormat,y=e.cellDateFormat,v=qs(t,n,i,o,r);return E(E({},e),{},{fieldDateTimeFormat:a||"YYYY-MM-DD ".concat(v),fieldDateFormat:s||"YYYY-MM-DD",fieldTimeFormat:l||v,fieldMonthFormat:c||"YYYY-MM",fieldYearFormat:u||"YYYY",fieldWeekFormat:d||"gggg-wo",fieldQuarterFormat:h||"YYYY-[Q]Q",yearFormat:p||"YYYY",cellYearFormat:m||"YYYY",cellQuarterFormat:f||"[Q]Q",cellDateFormat:y||g||"D"})}(e,n,i,o,r,a)}),[e,n,i,o,r,a])}function Qs(e,t,n){return null!=n?n:t.some((function(t){return e.includes(t)}))}var Xs=["showNow","showHour","showMinute","showSecond","showMillisecond","use12Hours","hourStep","minuteStep","secondStep","millisecondStep","hideDisabledOptions","defaultValue","disabledHours","disabledMinutes","disabledSeconds","disabledMilliseconds","disabledTime","changeOnScroll","defaultOpenValue"];function Js(e){return e&&"string"==typeof e}function el(e,t,n,i){return[e,t,n,i].some((function(e){return void 0!==e}))}function tl(e,t,n,i,o){var r=t,a=n,s=i;if(e||r||a||s||o){if(e){var l,c,u,d=[r,a,s].some((function(e){return!1===e})),h=[r,a,s].some((function(e){return!0===e})),p=!!d||!h;r=null!==(l=r)&&void 0!==l?l:p,a=null!==(c=a)&&void 0!==c?c:p,s=null!==(u=s)&&void 0!==u?u:p}}else r=!0,a=!0,s=!0;return[r,a,s,o]}function nl(e){var t=e.showTime,n=function(e){var t=zs(e,Xs),n=e.format,i=e.picker,o=null;return n&&(o=n,Array.isArray(o)&&(o=o[0]),o="object"===C(o)?o.format:o),"time"===i&&(t.format=o),[t,o]}(e),i=x(n,2),o=i[0],r=i[1],a=t&&"object"===C(t)?t:{},s=E(E({defaultOpenValue:a.defaultOpenValue||a.defaultValue},o),a),l=s.showMillisecond,c=s.showHour,u=s.showMinute,d=s.showSecond,h=tl(el(c,u,d,l),c,u,d,l),p=x(h,3);return c=p[0],u=p[1],d=p[2],[s,E(E({},s),{},{showHour:c,showMinute:u,showSecond:d,showMillisecond:l}),s.format,r]}function il(e,t,n,i,o){if("datetime"===e||"time"===e){for(var r=i,a=Fs(e,o,null),s=[t,n],l=0;l1&&void 0!==arguments[1]&&arguments[1];return xl.useMemo((function(){var n=e?Hs(e):e;return t&&n&&(n[1]=n[1]||n[0]),n}),[e,t])}function _l(e,t){var n=e.generateConfig,i=e.locale,o=e.picker,r=void 0===o?"date":o,a=e.prefixCls,s=void 0===a?"rc-picker":a,l=e.styles,c=void 0===l?{}:l,u=e.classNames,d=void 0===u?{}:u,h=e.order,p=void 0===h||h,m=e.components,f=void 0===m?{}:m,g=e.inputRender,y=e.allowClear,v=e.clearIcon,b=e.needConfirm,w=e.multiple,_=e.format,S=e.inputReadOnly,k=e.disabledDate,$=e.minDate,R=e.maxDate,A=e.showTime,O=e.value,j=e.defaultValue,T=e.pickerValue,N=e.defaultPickerValue,L=Cl(O),I=Cl(j),D=Cl(T),H=Cl(N),P="date"===r&&A?"datetime":r,z="time"===P||"datetime"===P,F=z||w,V=null!=b?b:z,B=nl(e),W=x(B,4),U=W[0],Y=W[1],Z=W[2],G=W[3],q=Ks(i,Y),K=xl.useMemo((function(){return il(P,Z,G,U,q)}),[P,Z,G,U,q]),Q=xl.useMemo((function(){return E(E({},e),{},{prefixCls:s,locale:q,picker:r,styles:c,classNames:d,order:p,components:E({input:g},f),clearIcon:rl(s,y,v),showTime:K,value:L,defaultValue:I,pickerValue:D,defaultPickerValue:H},null==t?void 0:t())}),[e]),X=function(e,t,n){return wl.useMemo((function(){var i=Hs(Fs(e,t,n)),o=i[0],r="object"===C(o)&&"mask"===o.type?o.format:null;return[i.map((function(e){return"string"==typeof e||"function"==typeof e?e:e.format})),r]}),[e,t,n])}(P,q,_),J=x(X,2),ee=J[0],te=J[1],ne=function(e,t,n){return!("function"!=typeof e[0]&&!n)||t}(ee,S,w),ie=function(e,t,n,i,o){return M((function(r,a){return!(!n||!n(r,a))||!(!i||!e.isAfter(i,r)||fl(e,t,i,r,a.type))||!(!o||!e.isAfter(r,o)||fl(e,t,o,r,a.type))}))}(n,i,k,$,R),oe=function(e,t,n,i){return M((function(o,r){var a=E({type:t},r);if(delete a.activeIndex,!e.isValidate(o)||n&&n(o,a))return!0;if(("date"===t||"time"===t)&&i){var s,l=r&&1===r.activeIndex?"end":"start",c=(null===(s=i.disabledTime)||void 0===s?void 0:s.call(i,o,l,{from:a.from}))||{},u=c.disabledHours,d=c.disabledMinutes,h=c.disabledSeconds,p=c.disabledMilliseconds,m=i.disabledHours,f=i.disabledMinutes,g=i.disabledSeconds,y=u||m,v=d||f,b=h||g,w=e.getHour(o),x=e.getMinute(o),C=e.getSecond(o),_=e.getMillisecond(o);if(y&&y().includes(w))return!0;if(v&&v(w).includes(x))return!0;if(b&&b(w,x).includes(C))return!0;if(p&&p(w,x,C).includes(_))return!0}return!1}))}(n,r,ie,K);return[xl.useMemo((function(){return E(E({},Q),{},{needConfirm:V,inputReadOnly:ne,disabledDate:ie})}),[Q,V,ne,ie]),P,F,ee,te,oe]}const Sl=window.React;function kl(e,t){var n,i,o,r,a,s,l,c,u,d,h,p=arguments.length>3?arguments[3]:void 0,m=!(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).every((function(e){return e}))&&e,f=(i=p,o=de(t||!1,{value:n=m}),r=x(o,2),a=r[0],s=r[1],l=Sl.useRef(n),c=Sl.useRef(),u=function(){we.cancel(c.current)},d=M((function(){s(l.current),i&&a!==l.current&&i(l.current)})),h=M((function(e,t){u(),l.current=e,e||t?d():c.current=we(d)})),Sl.useEffect((function(){return u}),[]),[a,h]),g=x(f,2),y=g[0],v=g[1];return[y,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.inherit&&!y||v(e,t.force)}]}const El=window.React;function $l(e){var t=El.useRef();return El.useImperativeHandle(e,(function(){var e;return{nativeElement:null===(e=t.current)||void 0===e?void 0:e.nativeElement,focus:function(e){var n;null===(n=t.current)||void 0===n||n.focus(e)},blur:function(){var e;null===(e=t.current)||void 0===e||e.blur()}}})),t}const Ml=window.React;function Rl(e,t){return Ml.useMemo((function(){return e||(t?(xe(!1,"`ranges` is deprecated. Please use `presets` instead."),Object.entries(t).map((function(e){var t=x(e,2);return{label:t[0],value:t[1]}}))):[])}),[e,t])}const Al=window.React;function Ol(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=Al.useRef(t);i.current=t,Ce((function(){if(!e){var t=we((function(){i.current(e)}),n);return function(){we.cancel(t)}}i.current(e)}),[e])}const jl=window.React;function Tl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=jl.useState(0),o=x(i,2),r=o[0],a=o[1],s=jl.useState(!1),l=x(s,2),c=l[0],u=l[1],d=jl.useRef([]),h=jl.useRef(null),p=jl.useRef(null),m=function(e){h.current=e};return Ol(c||n,(function(){c||(d.current=[],m(null))})),jl.useEffect((function(){c&&d.current.push(r)}),[c,r]),[c,function(e){u(e)},function(e){return e&&(p.current=e),p.current},r,a,function(n){var i=d.current,o=new Set(i.filter((function(e){return n[e]||t[e]}))),r=0===i[i.length-1]?1:0;return o.size>=2||e[r]?null:r},d.current,m,function(e){return h.current===e}]}const Nl=window.React;function Ll(e,t,n,i){switch(t){case"date":case"week":return e.addMonth(n,i);case"month":case"quarter":return e.addYear(n,i);case"year":return e.addYear(n,10*i);case"decade":return e.addYear(n,100*i);default:return n}}var Il=[];function Dl(e,t,n,i,o,r,a,s){var l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:Il,c=arguments.length>10&&void 0!==arguments[10]?arguments[10]:Il,u=arguments.length>11?arguments[11]:void 0,d=arguments.length>12?arguments[12]:void 0,h=arguments.length>13?arguments[13]:void 0,p="time"===a,m=r||0,f=function(t){var i=e.getNow();return p&&(i=bl(e,i)),l[t]||n[t]||i},g=x(arguments.length>9&&void 0!==arguments[9]?arguments[9]:Il,2),y=g[0],v=g[1],b=de((function(){return f(0)}),{value:y}),w=x(b,2),C=w[0],_=w[1],S=de((function(){return f(1)}),{value:v}),k=x(S,2),E=k[0],$=k[1],M=Nl.useMemo((function(){var t=[C,E][m];return p?t:bl(e,t,c[m])}),[p,C,E,m,e,c]),R=function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"panel";(0,[_,$][m])(n);var r=[C,E];r[m]=n,!u||fl(e,t,C,r[0],a)&&fl(e,t,E,r[1],a)||u(r,{source:o,range:1===m?"end":"start",mode:i})},A=Nl.useRef(null);return _e((function(){if(o&&!l[m]){var i=p?null:e.getNow();if(null!==A.current&&A.current!==m?i=[C,E][1^m]:n[m]?i=0===m?n[0]:function(n,i){if(s){var o={date:"month",week:"month",month:"year",quarter:"year"}[a];if(o&&!fl(e,t,n,i,o))return Ll(e,a,i,-1);if("year"===a&&n&&Math.floor(e.getYear(n)/10)!==Math.floor(e.getYear(i)/10))return Ll(e,a,i,-1)}return i}(n[0],n[1]):n[1^m]&&(i=n[1^m]),i){d&&e.isAfter(d,i)&&(i=d);var r=s?Ll(e,a,i,1):i;h&&e.isAfter(r,h)&&(i=s?Ll(e,a,h,-1):h),R(i,"reset")}}}),[o,m,n[m]]),Nl.useEffect((function(){A.current=o?m:null}),[o,m]),_e((function(){o&&l&&l[m]&&R(l[m],"reset")}),[o,m]),[M,R]}const Hl=window.React;function Pl(e,t){var n=Hl.useRef(e),i=Hl.useState({}),o=x(i,2)[1],r=function(e){return e&&void 0!==t?t:n.current};return[r,function(e){n.current=e,o({})},r(!0)]}const zl=window.React;var Fl=[];function Vl(e,t,n){return[function(i){return i.map((function(i){return vl(i,{generateConfig:e,locale:t,format:n[0]})}))},function(t,n){for(var i=Math.max(t.length,n.length),o=-1,r=0;r2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:2,a=[],s=n>=1?0|n:1,l=e;l<=t;l+=s){var c=o.includes(l);c&&i||a.push({label:Ds(l,r),value:l,disabled:c})}return a}function Kl(e){var t=arguments.length>2?arguments[2]:void 0,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})||{},i=n.use12Hours,o=n.hourStep,r=void 0===o?1:o,a=n.minuteStep,s=void 0===a?1:a,l=n.secondStep,c=void 0===l?1:l,u=n.millisecondStep,d=void 0===u?100:u,h=n.hideDisabledOptions,p=n.disabledTime,m=n.disabledHours,f=n.disabledMinutes,g=n.disabledSeconds,y=Zl.useMemo((function(){return t||e.getNow()}),[t,e]),v=Zl.useCallback((function(e){var t=(null==p?void 0:p(e))||{};return[t.disabledHours||m||Gl,t.disabledMinutes||f||Gl,t.disabledSeconds||g||Gl,t.disabledMilliseconds||Gl]}),[p,m,f,g]),b=Zl.useMemo((function(){return v(y)}),[y,v]),w=x(b,4),C=w[0],_=w[1],S=w[2],k=w[3],M=Zl.useCallback((function(e,t,n,o){var a=ql(0,23,r,h,e());return[i?a.map((function(e){return E(E({},e),{},{label:Ds(e.value%12||12,2)})})):a,function(e){return ql(0,59,s,h,t(e))},function(e,t){return ql(0,59,c,h,n(e,t))},function(e,t,n){return ql(0,999,d,h,o(e,t,n),3)}]}),[h,r,i,d,s,c]),R=Zl.useMemo((function(){return M(C,_,S,k)}),[M,C,_,S,k]),A=x(R,4),O=A[0],j=A[1],T=A[2],N=A[3];return[function(t,n){var i=function(){return O},o=j,r=T,a=N;if(n){var s=v(n),l=x(s,4),c=l[0],u=l[1],d=l[2],h=l[3],p=M(c,u,d,h),m=x(p,4),f=m[0];i=function(){return f},o=m[1],r=m[2],a=m[3]}var g=function(e,t,n,i,o,r){var a=e;function s(e,t,n){var i=r[e](a),o=n.find((function(e){return e.value===i}));if(!o||o.disabled){var s=n.filter((function(e){return!e.disabled})),l=$(s).reverse().find((function(e){return e.value<=i}))||s[0];l&&(i=l.value,a=r[t](a,i))}return i}var l=s("getHour","setHour",t()),c=s("getMinute","setMinute",n(l)),u=s("getSecond","setSecond",i(l,c));return s("getMillisecond","setMillisecond",o(l,c,u)),a}(t,i,o,r,a,e);return g},O,j,T,N]}const Ql=window.React;function Xl(e){var t=e.mode,n=e.internalMode,i=e.renderExtraFooter,o=e.showNow,r=e.showTime,a=e.onSubmit,s=e.onNow,c=e.invalid,u=e.needConfirm,d=e.generateConfig,h=e.disabledDate,p=Ql.useContext(Ts),m=p.prefixCls,f=p.locale,g=p.button,y=void 0===g?"button":g,v=d.getNow(),b=Kl(d,r,v),w=x(b,1)[0],C=null==i?void 0:i(t),_=h(v,{type:t}),S="".concat(m,"-now"),k="".concat(S,"-btn"),E=o&&Ql.createElement("li",{className:S},Ql.createElement("a",{className:l(k,_&&"".concat(k,"-disabled")),"aria-disabled":_,onClick:function(){if(!_){var e=w(v);s(e)}}},"date"===n?f.today:f.now)),$=u&&Ql.createElement("li",{className:"".concat(m,"-ok")},Ql.createElement(y,{disabled:c,onClick:a},f.ok)),M=(E||$)&&Ql.createElement("ul",{className:"".concat(m,"-ranges")},E,$);return C||M?Ql.createElement("div",{className:"".concat(m,"-footer")},C&&Ql.createElement("div",{className:"".concat(m,"-footer-extra")},C),M):null}function Jl(e,t,n){return function(i,o){var r=i.findIndex((function(i){return fl(e,t,i,o,n)}));if(-1===r)return[].concat($(i),[o]);var a=$(i);return a.splice(r,1),a}}const ec=window.React;var tc=ec.createContext(null);function nc(){return ec.useContext(tc)}function ic(e,t){var n=e.prefixCls,i=e.generateConfig,o=e.locale,r=e.disabledDate,a=e.minDate,s=e.maxDate,l=e.cellRender,c=e.hoverValue,u=e.hoverRangeValue,d=e.onHover,h=e.values,p=e.pickerValue,m=e.onSelect,f=e.prevIcon,g=e.nextIcon,y=e.superPrevIcon,v=e.superNextIcon,b=i.getNow();return[{now:b,values:h,pickerValue:p,prefixCls:n,disabledDate:r,minDate:a,maxDate:s,cellRender:l,hoverValue:c,hoverRangeValue:u,onHover:d,locale:o,generateConfig:i,onSelect:m,panelType:t,prevIcon:f,nextIcon:g,superPrevIcon:y,superNextIcon:v},b]}var oc=ec.createContext({});const rc=window.React;function ac(e){for(var t=e.rowNum,n=e.colNum,i=e.baseDate,o=e.getCellDate,r=e.prefixColumn,a=e.rowClassName,s=e.titleFormat,c=e.getCellText,u=e.getCellClassName,d=e.headerCells,h=e.cellSelection,p=void 0===h||h,m=e.disabledDate,f=nc(),g=f.prefixCls,y=f.panelType,v=f.now,b=f.disabledDate,w=f.cellRender,C=f.onHover,S=f.hoverValue,k=f.hoverRangeValue,$=f.generateConfig,M=f.values,R=f.locale,A=f.onSelect,O=m||b,j="".concat(g,"-cell"),T=rc.useContext(oc).onCellDblClick,N=[],L=0;L1&&(a=t.addDate(a,-7)),a}(r.locale,a,$),R=a.getMonth(s),A=(void 0===g?b:g)?function(e){var t=null==p?void 0:p(e,{type:"week"});return uc.createElement("td",{key:"week",className:l(v,"".concat(v,"-week"),_({},"".concat(v,"-disabled"),t)),onClick:function(){t||m(e)},onMouseEnter:function(){t||null==f||f(e)},onMouseLeave:function(){t||null==f||f(null)}},uc.createElement("div",{className:"".concat(v,"-inner")},a.locale.getWeek(r.locale,e)))}:null,O=[],j=r.shortWeekDays||(a.locale.getShortWeekDays?a.locale.getShortWeekDays(r.locale):[]);A&&O.push(uc.createElement("th",{key:"empty"},uc.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},r.week)));for(var T=0;T<7;T+=1)O.push(uc.createElement("th",{key:T},j[(T+E)%7]));var N=r.shortMonths||(a.locale.getShortMonths?a.locale.getShortMonths(r.locale):[]),L=uc.createElement("button",{type:"button","aria-label":r.yearSelect,key:"year",onClick:function(){u("year",s)},tabIndex:-1,className:"".concat(t,"-year-btn")},vl(s,{locale:r,format:r.yearFormat,generateConfig:a})),I=uc.createElement("button",{type:"button","aria-label":r.monthSelect,key:"month",onClick:function(){u("month",s)},tabIndex:-1,className:"".concat(t,"-month-btn")},r.monthFormat?vl(s,{locale:r,format:r.monthFormat,generateConfig:a}):N[R]),D=r.monthBeforeYear?[I,L]:[L,I];return uc.createElement(tc.Provider,{value:S},uc.createElement("div",{className:l(y,g&&"".concat(y,"-show-week"))},uc.createElement(cc,{offset:function(e){return a.addMonth(s,e)},superOffset:function(e){return a.addYear(s,e)},onChange:c,getStart:function(e){return a.setDate(e,1)},getEnd:function(e){var t=a.setDate(e,1);return t=a.addMonth(t,1),a.addDate(t,-1)}},D),uc.createElement(ac,i({titleFormat:r.fieldDateFormat},e,{colNum:7,rowNum:6,baseDate:M,headerCells:O,getCellDate:function(e,t){return a.addDate(e,t)},getCellText:function(e){return vl(e,{locale:r,format:r.cellDateFormat,generateConfig:a})},getCellClassName:function(e){return _(_({},"".concat(t,"-cell-in-view"),ul(a,e,s)),"".concat(t,"-cell-today"),dl(a,e,k))},prefixColumn:A,cellSelection:!b}))))}const hc=window.React;var pc=1/3;const mc=window.React;function fc(e){return e.map((function(e){return[e.value,e.label,e.disabled].join(",")})).join(";")}function gc(e){var t=e.units,n=e.value,i=e.optionalValue,o=e.type,r=e.onChange,a=e.onHover,s=e.onDblClick,c=e.changeOnScroll,u=nc(),d=u.prefixCls,h=u.cellRender,p=u.now,m=u.locale,f="".concat(d,"-time-panel"),g="".concat(d,"-time-panel-cell"),y=mc.useRef(null),v=mc.useRef(),b=function(){clearTimeout(v.current)},w=function(e,t){var n=hc.useRef(!1),i=hc.useRef(null),o=hc.useRef(null),r=function(){we.cancel(i.current),n.current=!1},a=hc.useRef();return[M((function(){var s=e.current;if(o.current=null,a.current=0,s){var l=s.querySelector('[data-value="'.concat(t,'"]')),c=s.querySelector("li");l&&c&&function e(){r(),n.current=!0,a.current+=1;var t=s.scrollTop,u=c.offsetTop,d=l.offsetTop,h=d-u;if(0===d&&l!==c||!Se(s))a.current<=5&&(i.current=we(e));else{var p=t+(h-t)*pc,m=Math.abs(h-p);if(null!==o.current&&o.current1&&void 0!==arguments[1]&&arguments[1];he(e),null==v||v(e),t&&pe(e)},fe=function(e,t){X(e),t&&me(t),pe(t,e)},ge=Mc.useMemo((function(){var e,t;if(Array.isArray(A)){var n=x(A,2);e=n[0],t=n[1]}else e=A;return e||t?(e=e||t,t=t||e,r.isAfter(e,t)?[t,e]:[e,t]):null}),[A,r]),ye=Us(O,j,T),ve=L[J]||Rc[J]||dc,be=Mc.useContext(oc),we=Mc.useMemo((function(){return E(E({},be),{},{hideHeader:I})}),[be,I]),xe="".concat(D,"-panel"),Ce=zs(e,["showWeek","prevIcon","nextIcon","superPrevIcon","superNextIcon","disabledDate","minDate","maxDate","onHover"]);return Mc.createElement(oc.Provider,{value:we},Mc.createElement("div",{ref:H,tabIndex:u,className:l(xe,_({},"".concat(xe,"-rtl"),"rtl"===a))},Mc.createElement(ve,i({},Ce,{showTime:Z,prefixCls:D,locale:U,generateConfig:r,onModeChange:fe,pickerValue:ue,onPickerValueChange:function(e){me(e,!0)},value:re[0],onSelect:function(e){if(se(e),me(e),Q!==S){var t=["decade","year"],n=[].concat(t,["month"]),i={quarter:[].concat(t,["quarter"]),week:[].concat($(n),["week"]),date:[].concat($(n),["date"])}[S]||n,o=i.indexOf(Q),r=i[o+1];r&&fe(r,e)}},values:re,cellRender:ye,hoverRangeValue:ge,hoverValue:R}))))}var Oc=Mc.memo(Mc.forwardRef(Ac));const jc=window.React;function Tc(e){var t=e.picker,n=e.multiplePanel,o=e.pickerValue,r=e.onPickerValueChange,a=e.needConfirm,s=e.onSubmit,l=e.range,c=e.hoverValue,u=jc.useContext(Ts),d=u.prefixCls,h=u.generateConfig,p=jc.useCallback((function(e,n){return Ll(h,t,e,n)}),[h,t]),m=jc.useMemo((function(){return p(o,1)}),[o,p]),f={onCellDblClick:function(){a&&s()}},g="time"===t,y=E(E({},e),{},{hoverValue:null,hoverRangeValue:null,hideHeader:g});return l?y.hoverRangeValue=c:y.hoverValue=c,n?jc.createElement("div",{className:"".concat(d,"-panels")},jc.createElement(oc.Provider,{value:E(E({},f),{},{hideNext:!0})},jc.createElement(Oc,y)),jc.createElement(oc.Provider,{value:E(E({},f),{},{hidePrev:!0})},jc.createElement(Oc,i({},y,{pickerValue:m,onPickerValueChange:function(e){r(p(e,-1))}})))):jc.createElement(oc.Provider,{value:E({},f)},jc.createElement(Oc,y))}const Nc=window.React;function Lc(e){return"function"==typeof e?e():e}function Ic(e){var t=e.prefixCls,n=e.presets,i=e.onClick,o=e.onHover;return n.length?Nc.createElement("div",{className:"".concat(t,"-presets")},Nc.createElement("ul",null,n.map((function(e,t){var n=e.label,r=e.value;return Nc.createElement("li",{key:t,onClick:function(){i(Lc(r))},onMouseEnter:function(){o(Lc(r))},onMouseLeave:function(){o(null)}},n)})))):null}const Dc=window.React;function Hc(e){var t=e.panelRender,n=e.internalMode,o=e.picker,r=e.showNow,a=e.range,s=e.multiple,c=e.activeInfo,u=void 0===c?[0,0,0]:c,d=e.presets,h=e.onPresetHover,p=e.onPresetSubmit,m=e.onFocus,f=e.onBlur,g=e.onPanelMouseDown,y=e.direction,v=e.value,b=e.onSelect,w=e.isInvalid,C=e.defaultOpenValue,S=e.onOk,k=e.onSubmit,E=Dc.useContext(Ts).prefixCls,$="".concat(E,"-panel"),M="rtl"===y,R=Dc.useRef(null),A=Dc.useRef(null),O=Dc.useState(0),j=x(O,2),T=j[0],N=j[1],L=Dc.useState(0),I=x(L,2),D=I[0],H=I[1],P=Dc.useState(0),z=x(P,2),F=z[0],V=z[1],B=x(u,3),W=B[0],U=B[1],Y=B[2],Z=Dc.useState(0),G=x(Z,2),q=G[0],K=G[1];function Q(e){return e.filter((function(e){return e}))}Dc.useEffect((function(){K(10)}),[W]),Dc.useEffect((function(){if(a&&A.current){var e,t=(null===(e=R.current)||void 0===e?void 0:e.offsetWidth)||0,n=A.current.getBoundingClientRect();if(!n.height||n.right<0)return void K((function(e){return Math.max(0,e-1)}));var i=(M?U-t:W)-n.left;if(V(i),T&&T=r&&e<=a)return i;var s=Math.min(Math.abs(e-r),Math.abs(e-a));s0?i:o));var c=o-i+1;return String(i+(c+(l+e)-i)%c)};switch(t){case"Backspace":case"Delete":n="",i=r;break;case"ArrowLeft":n="",a(-1);break;case"ArrowRight":n="",a(1);break;case"ArrowUp":n="",i=l(1);break;case"ArrowDown":n="",i=l(-1);break;default:isNaN(Number(t))||(i=n=B+t)}if(null!==n&&(W(n),n.length>=o&&(a(1),W(""))),null!==i){var c=J.slice(0,re)+Ds(i,o)+J.slice(ae);le(c.slice(0,s.length))}X({})},onMouseDown:function(){ce.current=!0},onMouseUp:function(e){var t=e.target.selectionStart,n=ne.getMaskCellIndex(t);G(n),X({}),null==E||E(e),ce.current=!1},onPaste:function(e){var t=e.clipboardData.getData("text");c(t)&&le(t)}}:{};return Xc.createElement("div",{ref:ee,className:l(j,_(_({},"".concat(j,"-active"),n&&r),"".concat(j,"-placeholder"),d))},Xc.createElement(O,i({ref:te,"aria-invalid":y,autoComplete:"off"},b,{onKeyDown:de,onBlur:ue},pe,{value:J,onChange:function(e){if(!s){var t=e.target.value;se(t),z(t),u(t)}}})),Xc.createElement(Zc,{type:"suffix",icon:a}),v)})),eu=["id","prefix","clearIcon","suffixIcon","separator","activeIndex","activeHelp","allHelp","focused","onFocus","onBlur","onKeyDown","locale","generateConfig","placeholder","className","style","onClick","onClear","value","onChange","onSubmit","onInputChange","format","maskFormat","preserveInvalidOnBlur","onInvalid","disabled","invalid","inputReadOnly","direction","onOpenChange","onActiveInfo","placement","onMouseDown","required","aria-required","autoFocus","tabIndex"],tu=["index"];const nu=window.React;function iu(e,t){var n=e.id,o=e.prefix,r=e.clearIcon,a=e.suffixIcon,s=e.separator,c=void 0===s?"~":s,u=e.activeIndex;e.activeHelp,e.allHelp;var d=e.focused;e.onFocus,e.onBlur,e.onKeyDown,e.locale,e.generateConfig;var h=e.placeholder,p=e.className,m=e.style,f=e.onClick,g=e.onClear,y=e.value;e.onChange,e.onSubmit,e.onInputChange,e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var v=e.disabled,b=e.invalid;e.inputReadOnly;var w=e.direction;e.onOpenChange;var S=e.onActiveInfo;e.placement;var $=e.onMouseDown;e.required,e["aria-required"];var R=e.autoFocus,A=e.tabIndex,O=k(e,eu),j="rtl"===w,T=nu.useContext(Ts).prefixCls,N=nu.useMemo((function(){if("string"==typeof n)return[n];var e=n||{};return[e.start,e.end]}),[n]),L=nu.useRef(),I=nu.useRef(),D=nu.useRef(),H=function(e){var t;return null===(t=[I,D][e])||void 0===t?void 0:t.current};nu.useImperativeHandle(t,(function(){return{nativeElement:L.current,focus:function(e){if("object"===C(e)){var t,n=e||{},i=n.index,o=void 0===i?0:i,r=k(n,tu);null===(t=H(o))||void 0===t||t.focus(r)}else{var a;null===(a=H(null!=e?e:0))||void 0===a||a.focus()}},blur:function(){var e,t;null===(e=H(0))||void 0===e||e.blur(),null===(t=H(1))||void 0===t||t.blur()}}}));var P=Bc(O),z=nu.useMemo((function(){return Array.isArray(h)?h:[h,h]}),[h]),F=zc(E(E({},e),{},{id:N,placeholder:z})),V=x(F,1)[0],B=nu.useState({position:"absolute",width:0}),W=x(B,2),U=W[0],Y=W[1],Z=M((function(){var e=H(u);if(e){var t=e.nativeElement.getBoundingClientRect(),n=L.current.getBoundingClientRect(),i=t.left-n.left;Y((function(e){return E(E({},e),{},{width:t.width,left:i})})),S([t.left,t.right,n.width])}}));nu.useEffect((function(){Z()}),[u]);var G=r&&(y[0]&&!v[0]||y[1]&&!v[1]),q=R&&!v[0],K=R&&!q&&!v[1];return nu.createElement(ke,{onResize:Z},nu.createElement("div",i({},P,{className:l(T,"".concat(T,"-range"),_(_(_(_({},"".concat(T,"-focused"),d),"".concat(T,"-disabled"),v.every((function(e){return e}))),"".concat(T,"-invalid"),b.some((function(e){return e}))),"".concat(T,"-rtl"),j),p),style:m,ref:L,onClick:f,onMouseDown:function(e){var t=e.target;t!==I.current.inputElement&&t!==D.current.inputElement&&e.preventDefault(),null==$||$(e)}}),o&&nu.createElement("div",{className:"".concat(T,"-prefix")},o),nu.createElement(Jc,i({ref:I},V(0),{autoFocus:q,tabIndex:A,"date-range":"start"})),nu.createElement("div",{className:"".concat(T,"-range-separator")},c),nu.createElement(Jc,i({ref:D},V(1),{autoFocus:K,tabIndex:A,"date-range":"end"})),nu.createElement("div",{className:"".concat(T,"-active-bar"),style:U}),nu.createElement(Zc,{type:"suffix",icon:a}),G&&nu.createElement(Gc,{icon:r,onClear:g})))}var ou=nu.forwardRef(iu);const ru=window.React;function au(e,t){var n=null!=e?e:t;return Array.isArray(n)?n:[n,n]}function su(e){return 1===e?"end":"start"}function lu(e,t){var n=_l(e,(function(){var t=e.disabled,n=e.allowEmpty;return{disabled:au(t,!1),allowEmpty:au(n,!1)}})),o=x(n,6),r=o[0],a=o[1],s=o[2],l=o[3],c=o[4],u=o[5],d=r.prefixCls,h=r.styles,p=r.classNames,m=r.defaultValue,f=r.value,g=r.needConfirm,y=r.onKeyDown,v=r.disabled,b=r.allowEmpty,w=r.disabledDate,C=r.minDate,_=r.maxDate,S=r.defaultOpen,k=r.open,R=r.onOpenChange,A=r.locale,O=r.generateConfig,j=r.picker,T=r.showNow,N=r.showToday,L=r.showTime,I=r.mode,D=r.onPanelChange,H=r.onCalendarChange,P=r.onOk,z=r.defaultPickerValue,F=r.pickerValue,V=r.onPickerValueChange,B=r.inputReadOnly,U=r.suffixIcon,Y=r.onFocus,Z=r.onBlur,G=r.presets,q=r.ranges,K=r.components,Q=r.cellRender,X=r.dateRender,J=r.monthCellRender,ee=r.onClick,te=$l(t),ne=kl(k,S,v,R),ie=x(ne,2),oe=ie[0],re=ie[1],ae=function(e,t){!v.some((function(e){return!e}))&&e||re(e,t)},se=Wl(O,A,l,!0,!1,m,f,H,P),le=x(se,5),ce=le[0],ue=le[1],he=le[2],pe=le[3],me=le[4],fe=he(),ge=Tl(v,b,oe),ye=x(ge,9),ve=ye[0],be=ye[1],we=ye[2],xe=ye[3],Ce=ye[4],Se=ye[5],ke=ye[6],Ee=ye[7],$e=ye[8],Me=function(e,t){be(!0),null==Y||Y(e,{range:su(null!=t?t:xe)})},Re=function(e,t){be(!1),null==Z||Z(e,{range:su(null!=t?t:xe)})},Ae=ru.useMemo((function(){if(!L)return null;var e=L.disabledTime,t=e?function(t){var n=su(xe),i=Vs(fe,ke,xe);return e(t,n,{from:i})}:void 0;return E(E({},L),{},{disabledTime:t})}),[L,xe,fe,ke]),Oe=de([j,j],{value:I}),je=x(Oe,2),Te=je[0],Ne=je[1],Le=Te[xe]||j,Ie="date"===Le&&Ae?"datetime":Le,De=Ie===j&&"time"!==Ie,He=Yl(j,Le,T,N,!0),Pe=Ul(r,ce,ue,he,pe,v,l,ve,oe,u),ze=x(Pe,2),Fe=ze[0],Ve=ze[1],Be=function(e,t,n,i,o,r){var a=n[n.length-1];return function(s,l){var c=x(e,2),u=c[0],d=c[1],h=E(E({},l),{},{from:Vs(e,n)});return!(1!==a||!t[0]||!u||fl(i,o,u,s,h.type)||!i.isAfter(u,s))||!(0!==a||!t[1]||!d||fl(i,o,d,s,h.type)||!i.isAfter(s,d))||(null==r?void 0:r(s,h))}}(fe,v,ke,O,A,w),We=Zs(fe,u,b),Ue=x(We,2),Ye=Ue[0],Ze=Ue[1],Ge=Dl(O,A,fe,Te,oe,xe,a,De,z,F,null==Ae?void 0:Ae.defaultOpenValue,V,C,_),qe=x(Ge,2),Ke=qe[0],Qe=qe[1],Xe=M((function(e,t,n){var i=Ps(Te,xe,t);if(i[0]===Te[0]&&i[1]===Te[1]||Ne(i),D&&!1!==n){var o=$(fe);e&&(o[xe]=e),D(o,i)}})),Je=function(e,t){return Ps(fe,t,e)},et=function(e,t){var n=fe;e&&(n=Je(e,xe)),Ee(xe);var i=Se(n);pe(n),Fe(xe,null===i),null===i?ae(!1,{force:!0}):t||te.current.focus({index:i})},tt=ru.useState(null),nt=x(tt,2),it=nt[0],ot=nt[1],rt=ru.useState(null),at=x(rt,2),st=at[0],lt=at[1],ct=ru.useMemo((function(){return st||fe}),[fe,st]);ru.useEffect((function(){oe||lt(null)}),[oe]);var ut=ru.useState([0,0,0]),dt=x(ut,2),ht=dt[0],pt=dt[1],mt=Rl(G,q),ft=Us(Q,X,J,su(xe)),gt=fe[xe]||null,yt=M((function(e){return u(e,{activeIndex:xe})})),vt=ru.useMemo((function(){var e=bt(r,!1);return W(r,[].concat($(Object.keys(e)),["onChange","onCalendarChange","style","className","onPanelChange","disabledTime"]))}),[r]),wt=ru.createElement(Hc,i({},vt,{showNow:He,showTime:Ae,range:!0,multiplePanel:De,activeInfo:ht,disabledDate:Be,onFocus:function(e){ae(!0),Me(e)},onBlur:Re,onPanelMouseDown:function(){we("panel")},picker:j,mode:Le,internalMode:Ie,onPanelChange:Xe,format:c,value:gt,isInvalid:yt,onChange:null,onSelect:function(e){var t=Ps(fe,xe,e);pe(t),g||s||a!==Ie||et(e)},pickerValue:Ke,defaultOpenValue:Hs(null==L?void 0:L.defaultOpenValue)[xe],onPickerValueChange:Qe,hoverValue:ct,onHover:function(e){lt(e?Je(e,xe):null),ot("cell")},needConfirm:g,onSubmit:et,onOk:me,presets:mt,onPresetHover:function(e){lt(e),ot("preset")},onPresetSubmit:function(e){Ve(e)&&ae(!1,{force:!0})},onNow:function(e){et(e)},cellRender:ft})),xt=ru.useMemo((function(){return{prefixCls:d,locale:A,generateConfig:O,button:K.button,input:K.input}}),[d,A,O,K.button,K.input]);return _e((function(){oe&&void 0!==xe&&Xe(null,j,!1)}),[oe,xe,j]),_e((function(){var e=we();oe||"input"!==e||(ae(!1),et(null,!0)),oe||!s||g||"panel"!==e||(ae(!0),et())}),[oe]),ru.createElement(Ts.Provider,{value:xt},ru.createElement(Is,i({},Bs(r),{popupElement:wt,popupStyle:h.popup,popupClassName:p.popup,visible:oe,onClose:function(){ae(!1)},range:!0}),ru.createElement(ou,i({},r,{ref:te,suffixIcon:U,activeIndex:ve||oe?xe:null,activeHelp:!!st,allHelp:!!st&&"preset"===it,focused:ve,onFocus:function(e,t){var n=ke.length,i=ke[n-1];n&&i!==t&&g&&!b[i]&&!$e(i)&&fe[i]?te.current.focus({index:i}):(we("input"),ae(!0,{inherit:!0}),xe!==t&&oe&&!g&&s&&et(null,!0),Ce(t),Me(e,t))},onBlur:function(e,t){if(ae(!1),!g&&"input"===we()){var n=Se(fe);Fe(xe,null===n)}Re(e,t)},onKeyDown:function(e,t){"Tab"===e.key&&et(null,!0),null==y||y(e,t)},onSubmit:et,value:ct,maskFormat:c,onChange:function(e,t){var n=Je(e,t);pe(n)},onInputChange:function(){we("input")},format:l,inputReadOnly:B,disabled:v,open:oe,onOpenChange:ae,onClick:function(e){var t,n=e.target.getRootNode();if(!te.current.nativeElement.contains(null!==(t=n.activeElement)&&void 0!==t?t:document.activeElement)){var i=v.findIndex((function(e){return!e}));i>=0&&te.current.focus({index:i})}ae(!0),null==ee||ee(e)},onClear:function(){Ve(null),ae(!1,{force:!0})},invalid:Ye,onInvalid:Ze,onActiveInfo:pt}))))}var cu=ru.forwardRef(lu),uu=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"];const du=window.React;var hu=void 0;function pu(e,t){var n=e.prefixCls,o=e.invalidate,r=e.item,a=e.renderItem,s=e.responsive,c=e.responsiveDisabled,u=e.registerSize,d=e.itemKey,h=e.className,p=e.style,m=e.children,f=e.display,g=e.order,y=e.component,v=void 0===y?"div":y,b=k(e,uu),w=s&&!f;function x(e){u(d,e)}du.useEffect((function(){return function(){x(null)}}),[]);var C,_=a&&r!==hu?a(r,{index:g}):m;o||(C={opacity:w?0:1,height:w?0:hu,overflowY:w?"hidden":hu,order:s?g:hu,pointerEvents:w?"none":hu,position:w?"absolute":hu});var S={};w&&(S["aria-hidden"]=!0);var $=du.createElement(v,i({className:l(!o&&n,h),style:E(E({},C),p)},S,b,{ref:t}),_);return s&&($=du.createElement(ke,{onResize:function(e){x(e.offsetWidth)},disabled:c},$)),$}var mu=du.forwardRef(pu);mu.displayName="Item";const fu=window.React,gu=window.ReactDOM.unstable_batchedUpdates;function yu(e,t){var n=fu.useState(t),i=x(n,2),o=i[0],r=i[1];return[o,M((function(t){e((function(){r(t)}))}))]}var vu=window.React.createContext(null),bu=["component"],wu=["className"],xu=["className"];const Cu=window.React;var _u=function(e,t){var n=Cu.useContext(vu);if(!n){var o=e.component,r=void 0===o?"div":o,a=k(e,bu);return Cu.createElement(r,i({},a,{ref:t}))}var s=n.className,c=k(n,wu),u=e.className,d=k(e,xu);return Cu.createElement(vu.Provider,{value:null},Cu.createElement(mu,i({ref:t,className:l(s,u)},c,d)))},Su=Cu.forwardRef(_u);Su.displayName="RawItem";var ku=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"];const Eu=window.React,$u=window.React.useState,Mu=window.React.useMemo,Ru=window.React.useCallback;var Au="responsive",Ou="invalidate";function ju(e){return"+ ".concat(e.length," ...")}function Tu(e,t){var n,o=e.prefixCls,r=void 0===o?"rc-overflow":o,a=e.data,s=void 0===a?[]:a,c=e.renderItem,u=e.renderRawItem,d=e.itemKey,h=e.itemWidth,p=void 0===h?10:h,m=e.ssr,f=e.style,g=e.className,y=e.maxCount,v=e.renderRest,b=e.renderRawRest,w=e.suffix,C=e.component,_=void 0===C?"div":C,S=e.itemComponent,$=e.onVisibleChange,M=k(e,ku),R="full"===m,A=(n=fu.useRef(null),function(e){n.current||(n.current=[],function(e){if("undefined"==typeof MessageChannel)we(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}((function(){gu((function(){n.current.forEach((function(e){e()})),n.current=null}))}))),n.current.push(e)}),O=yu(A,null),j=x(O,2),T=j[0],N=j[1],L=T||0,I=yu(A,new Map),D=x(I,2),H=D[0],P=D[1],z=yu(A,0),F=x(z,2),V=F[0],B=F[1],W=yu(A,0),U=x(W,2),Y=U[0],Z=U[1],G=yu(A,0),q=x(G,2),K=q[0],Q=q[1],X=$u(null),J=x(X,2),ee=J[0],te=J[1],ne=$u(null),ie=x(ne,2),oe=ie[0],re=ie[1],ae=Eu.useMemo((function(){return null===oe&&R?Number.MAX_SAFE_INTEGER:oe||0}),[oe,T]),se=$u(!1),le=x(se,2),ce=le[0],ue=le[1],de="".concat(r,"-item"),he=Math.max(V,Y),pe=y===Au,me=s.length&&pe,fe=y===Ou,ge=me||"number"==typeof y&&s.length>y,ye=Mu((function(){var e=s;return me?e=null===T&&R?s:s.slice(0,Math.min(s.length,L/p)):"number"==typeof y&&(e=s.slice(0,y)),e}),[s,p,T,y,me]),ve=Mu((function(){return me?s.slice(ae+1):s.slice(ye.length)}),[s,ye,me,ae]),be=Ru((function(e,t){var n;return"function"==typeof d?d(e):null!==(n=d&&(null==e?void 0:e[d]))&&void 0!==n?n:t}),[d]),xe=Ru(c||function(e){return e},[c]);function Ce(e,t,n){(oe!==e||void 0!==t&&t!==ee)&&(re(e),n||(ue(eL){Ce(i-1,e-o-K+Y);break}}w&&Ee(0)+K>L&&te(null)}}),[L,H,Y,K,be,ye]);var $e=ce&&!!ve.length,Me={};null!==ee&&me&&(Me={position:"absolute",left:ee,top:0});var Re={prefixCls:de,responsive:me,component:S,invalidate:fe},Ae=u?function(e,t){var n=be(e,t);return Eu.createElement(vu.Provider,{key:n,value:E(E({},Re),{},{order:t,item:e,itemKey:n,registerSize:Se,display:t<=ae})},u(e,t))}:function(e,t){var n=be(e,t);return Eu.createElement(mu,i({},Re,{order:t,key:n,item:e,renderItem:xe,itemKey:n,registerSize:Se,display:t<=ae}))},Oe={order:$e?ae:Number.MAX_SAFE_INTEGER,className:"".concat(de,"-rest"),registerSize:function(e,t){Z(t),B(Y)},display:$e},je=v||ju,Te=b?Eu.createElement(vu.Provider,{value:E(E({},Re),Oe)},b(ve)):Eu.createElement(mu,i({},Re,Oe),"function"==typeof je?je(ve):je),Ne=Eu.createElement(_,i({className:l(!fe&&r,g),style:f,ref:t},M),ye.map(Ae),ge?Te:null,w&&Eu.createElement(mu,i({},Re,{responsive:pe,responsiveDisabled:!me,order:ae,className:"".concat(de,"-suffix"),registerSize:function(e,t){Q(t)},display:!0,style:Me}),w));return pe?Eu.createElement(ke,{onResize:function(e,t){N(t.clientWidth)},disabled:!me},Ne):Ne}var Nu=Eu.forwardRef(Tu);Nu.displayName="Overflow",Nu.Item=Su,Nu.RESPONSIVE=Au,Nu.INVALIDATE=Ou;const Lu=window.React;function Iu(e){var t=e.prefixCls,n=e.value,i=e.onRemove,o=e.removeIcon,r=void 0===o?"×":o,a=e.formatDate,s=e.disabled,c=e.maxTagCount,u=e.placeholder,d="".concat(t,"-selector"),h="".concat(t,"-selection"),p="".concat(h,"-overflow");function m(e,t){return Lu.createElement("span",{className:l("".concat(h,"-item")),title:"string"==typeof e?e:null},Lu.createElement("span",{className:"".concat(h,"-item-content")},e),!s&&t&&Lu.createElement("span",{onMouseDown:function(e){e.preventDefault()},onClick:t,className:"".concat(h,"-item-remove")},r))}return Lu.createElement("div",{className:d},Lu.createElement(Nu,{prefixCls:p,data:n,renderItem:function(e){return m(a(e),(function(t){t&&t.stopPropagation(),i(e)}))},renderRest:function(e){return m("+ ".concat(e.length," ..."))},itemKey:function(e){return a(e)},maxCount:c}),!n.length&&Lu.createElement("span",{className:"".concat(t,"-selection-placeholder")},u))}var Du=["id","open","prefix","clearIcon","suffixIcon","activeHelp","allHelp","focused","onFocus","onBlur","onKeyDown","locale","generateConfig","placeholder","className","style","onClick","onClear","internalPicker","value","onChange","onSubmit","onInputChange","multiple","maxTagCount","format","maskFormat","preserveInvalidOnBlur","onInvalid","disabled","invalid","inputReadOnly","direction","onOpenChange","onMouseDown","required","aria-required","autoFocus","tabIndex","removeIcon"];const Hu=window.React;function Pu(e,t){e.id;var n=e.open,o=e.prefix,r=e.clearIcon,a=e.suffixIcon;e.activeHelp,e.allHelp;var s=e.focused;e.onFocus,e.onBlur,e.onKeyDown;var c=e.locale,u=e.generateConfig,d=e.placeholder,h=e.className,p=e.style,m=e.onClick,f=e.onClear,g=e.internalPicker,y=e.value,v=e.onChange,b=e.onSubmit;e.onInputChange;var w=e.multiple,C=e.maxTagCount;e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var S=e.disabled,$=e.invalid;e.inputReadOnly;var M=e.direction;e.onOpenChange;var R=e.onMouseDown;e.required,e["aria-required"];var A=e.autoFocus,O=e.tabIndex,j=e.removeIcon,T=k(e,Du),N="rtl"===M,L=Hu.useContext(Ts).prefixCls,I=Hu.useRef(),D=Hu.useRef();Hu.useImperativeHandle(t,(function(){return{nativeElement:I.current,focus:function(e){var t;null===(t=D.current)||void 0===t||t.focus(e)},blur:function(){var e;null===(e=D.current)||void 0===e||e.blur()}}}));var H=Bc(T),P=zc(E(E({},e),{},{onChange:function(e){v([e])}}),(function(e){return{value:e.valueTexts[0]||"",active:s}})),z=x(P,2),F=z[0],V=z[1],B=!(!r||!y.length||S),W=w?Hu.createElement(Hu.Fragment,null,Hu.createElement(Iu,{prefixCls:L,value:y,onRemove:function(e){var t=y.filter((function(t){return t&&!fl(u,c,t,e,g)}));v(t),n||b()},formatDate:V,maxTagCount:C,disabled:S,removeIcon:j,placeholder:d}),Hu.createElement("input",{className:"".concat(L,"-multiple-input"),value:y.map(V).join(","),ref:D,readOnly:!0,autoFocus:A,tabIndex:O}),Hu.createElement(Zc,{type:"suffix",icon:a}),B&&Hu.createElement(Gc,{icon:r,onClear:f})):Hu.createElement(Jc,i({ref:D},F(),{autoFocus:A,tabIndex:O,suffixIcon:a,clearIcon:B&&Hu.createElement(Gc,{icon:r,onClear:f}),showActiveCls:!1}));return Hu.createElement("div",i({},H,{className:l(L,_(_(_(_(_({},"".concat(L,"-multiple"),w),"".concat(L,"-focused"),s),"".concat(L,"-disabled"),S),"".concat(L,"-invalid"),$),"".concat(L,"-rtl"),N),h),style:p,ref:I,onClick:m,onMouseDown:function(e){var t;e.target!==(null===(t=D.current)||void 0===t?void 0:t.inputElement)&&e.preventDefault(),null==R||R(e)}}),o&&Hu.createElement("div",{className:"".concat(L,"-prefix")},o),W)}var zu=Hu.forwardRef(Pu);const Fu=window.React;function Vu(e,t){var n=_l(e),o=x(n,6),r=o[0],a=o[1],s=o[2],l=o[3],c=o[4],u=o[5],d=r,h=d.prefixCls,p=d.styles,m=d.classNames,f=d.order,g=d.defaultValue,y=d.value,v=d.needConfirm,b=d.onChange,w=d.onKeyDown,C=d.disabled,_=d.disabledDate,S=d.minDate,k=d.maxDate,R=d.defaultOpen,A=d.open,O=d.onOpenChange,j=d.locale,T=d.generateConfig,N=d.picker,L=d.showNow,I=d.showToday,D=d.showTime,H=d.mode,P=d.onPanelChange,z=d.onCalendarChange,F=d.onOk,V=d.multiple,B=d.defaultPickerValue,U=d.pickerValue,Y=d.onPickerValueChange,Z=d.inputReadOnly,G=d.suffixIcon,q=d.removeIcon,K=d.onFocus,Q=d.onBlur,X=d.presets,J=d.components,ee=d.cellRender,te=d.dateRender,ne=d.monthCellRender,ie=d.onClick,oe=$l(t);function re(e){return null===e?null:V?e:e[0]}var ae=Jl(T,j,a),se=kl(A,R,[C],O),le=x(se,2),ce=le[0],ue=le[1],he=Wl(T,j,l,!1,f,g,y,(function(e,t,n){if(z){var i=E({},n);delete i.range,z(re(e),re(t),i)}}),(function(e){null==F||F(re(e))})),pe=x(he,5),me=pe[0],fe=pe[1],ge=pe[2],ye=pe[3],ve=pe[4],be=ge(),we=Tl([C]),xe=x(we,4),Ce=xe[0],Se=xe[1],ke=xe[2],Ee=xe[3],$e=function(e){Se(!0),null==K||K(e,{})},Me=function(e){Se(!1),null==Q||Q(e,{})},Re=de(N,{value:H}),Ae=x(Re,2),Oe=Ae[0],je=Ae[1],Te="date"===Oe&&D?"datetime":Oe,Ne=Yl(N,Oe,L,I),Le=b&&function(e,t){b(re(e),re(t))},Ie=Ul(E(E({},r),{},{onChange:Le}),me,fe,ge,ye,[],l,Ce,ce,u),De=x(Ie,2)[1],He=Zs(be,u),Pe=x(He,2),ze=Pe[0],Fe=Pe[1],Ve=Fu.useMemo((function(){return ze.some((function(e){return e}))}),[ze]),Be=Dl(T,j,be,[Oe],ce,Ee,a,!1,B,U,Hs(null==D?void 0:D.defaultOpenValue),(function(e,t){if(Y){var n=E(E({},t),{},{mode:t.mode[0]});delete n.range,Y(e[0],n)}}),S,k),We=x(Be,2),Ue=We[0],Ye=We[1],Ze=M((function(e,t,n){if(je(t),P&&!1!==n){var i=e||be[be.length-1];P(i,t)}})),Ge=function(){De(ge()),ue(!1,{force:!0})},qe=Fu.useState(null),Ke=x(qe,2),Qe=Ke[0],Xe=Ke[1],Je=Fu.useState(null),et=x(Je,2),tt=et[0],nt=et[1],it=Fu.useMemo((function(){var e=[tt].concat($(be)).filter((function(e){return e}));return V?e:e.slice(0,1)}),[be,tt,V]),ot=Fu.useMemo((function(){return!V&&tt?[tt]:be.filter((function(e){return e}))}),[be,tt,V]);Fu.useEffect((function(){ce||nt(null)}),[ce]);var rt=Rl(X),at=function(e){var t=V?ae(ge(),e):[e];De(t)&&!V&&ue(!1,{force:!0})},st=Us(ee,te,ne),lt=Fu.useMemo((function(){var e=bt(r,!1),t=W(r,[].concat($(Object.keys(e)),["onChange","onCalendarChange","style","className","onPanelChange"]));return E(E({},t),{},{multiple:r.multiple})}),[r]),ct=Fu.createElement(Hc,i({},lt,{showNow:Ne,showTime:D,disabledDate:_,onFocus:function(e){ue(!0),$e(e)},onBlur:Me,picker:N,mode:Oe,internalMode:Te,onPanelChange:Ze,format:c,value:be,isInvalid:u,onChange:null,onSelect:function(e){if(ke("panel"),!V||Te===N){var t=V?ae(ge(),e):[e];ye(t),v||s||a!==Te||Ge()}},pickerValue:Ue,defaultOpenValue:null==D?void 0:D.defaultOpenValue,onPickerValueChange:Ye,hoverValue:it,onHover:function(e){nt(e),Xe("cell")},needConfirm:v,onSubmit:Ge,onOk:ve,presets:rt,onPresetHover:function(e){nt(e),Xe("preset")},onPresetSubmit:at,onNow:function(e){at(e)},cellRender:st})),ut=Fu.useMemo((function(){return{prefixCls:h,locale:j,generateConfig:T,button:J.button,input:J.input}}),[h,j,T,J.button,J.input]);return _e((function(){ce&&void 0!==Ee&&Ze(null,N,!1)}),[ce,Ee,N]),_e((function(){var e=ke();ce||"input"!==e||(ue(!1),Ge()),ce||!s||v||"panel"!==e||Ge()}),[ce]),Fu.createElement(Ts.Provider,{value:ut},Fu.createElement(Is,i({},Bs(r),{popupElement:ct,popupStyle:p.popup,popupClassName:m.popup,visible:ce,onClose:function(){ue(!1)}}),Fu.createElement(zu,i({},r,{ref:oe,suffixIcon:G,removeIcon:q,activeHelp:!!tt,allHelp:!!tt&&"preset"===Qe,focused:Ce,onFocus:function(e){ke("input"),ue(!0,{inherit:!0}),$e(e)},onBlur:function(e){ue(!1),Me(e)},onKeyDown:function(e,t){"Tab"===e.key&&Ge(),null==w||w(e,t)},onSubmit:Ge,value:ot,maskFormat:c,onChange:function(e){ye(e)},onInputChange:function(){ke("input")},internalPicker:a,format:l,inputReadOnly:Z,disabled:C,open:ce,onOpenChange:ue,onClick:function(e){C||oe.current.nativeElement.contains(document.activeElement)||oe.current.focus(),ue(!0),null==ie||ie(e)},onClear:function(){De(null),ue(!1,{force:!0})},invalid:Ve,onInvalid:function(e){Fe(e,0)}}))))}var Bu=Fu.forwardRef(Vu);const Wu=(e,t)=>{const{componentCls:n,controlHeight:i}=e,o=t?`${n}-${t}`:"",r=Rt(e);return[{[`${n}-multiple${o}`]:{paddingBlock:r.containerPadding,paddingInlineStart:r.basePadding,minHeight:i,[`${n}-selection-item`]:{height:r.itemHeight,lineHeight:a(r.itemLineHeight)}}}]},Uu=e=>{const{componentCls:t,calc:n,lineWidth:i}=e,o=R(e,{fontHeight:e.fontSize,selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS,controlHeight:e.controlHeightSM}),r=R(e,{fontHeight:n(e.multipleItemHeightLG).sub(n(i).mul(2).equal()).equal(),fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius,controlHeight:e.controlHeightLG});return[Wu(o,"small"),Wu(e),Wu(r,"large"),{[`${t}${t}-multiple`]:Object.assign(Object.assign({width:"100%",cursor:"text",[`${t}-selector`]:{flex:"auto",padding:0,position:"relative","&:after":{margin:0},[`${t}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:0,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}}},Mt(e)),{[`${t}-multiple-input`]:{width:0,height:0,border:0,visibility:"hidden",position:"absolute",zIndex:-1}})}]},Yu=e=>{const{pickerCellCls:t,pickerCellInnerCls:n,cellHeight:i,borderRadiusSM:o,motionDurationMid:r,cellHoverBg:s,lineWidth:l,lineType:c,colorPrimary:u,cellActiveWithRangeBg:d,colorTextLightSolid:h,colorTextDisabled:p,cellBgDisabled:m,colorFillSecondary:f}=e;return{"&::before":{position:"absolute",top:"50%",insetInlineStart:0,insetInlineEnd:0,zIndex:1,height:i,transform:"translateY(-50%)",content:'""',pointerEvents:"none"},[n]:{position:"relative",zIndex:2,display:"inline-block",minWidth:i,height:i,lineHeight:a(i),borderRadius:o,transition:`background ${r}`},[`&:hover:not(${t}-in-view):not(${t}-disabled),\n &:hover:not(${t}-selected):not(${t}-range-start):not(${t}-range-end):not(${t}-disabled)`]:{[n]:{background:s}},[`&-in-view${t}-today ${n}`]:{"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:1,border:`${a(l)} ${c} ${u}`,borderRadius:o,content:'""'}},[`&-in-view${t}-in-range,\n &-in-view${t}-range-start,\n &-in-view${t}-range-end`]:{position:"relative",[`&:not(${t}-disabled):before`]:{background:d}},[`&-in-view${t}-selected,\n &-in-view${t}-range-start,\n &-in-view${t}-range-end`]:{[`&:not(${t}-disabled) ${n}`]:{color:h,background:u},[`&${t}-disabled ${n}`]:{background:f}},[`&-in-view${t}-range-start:not(${t}-disabled):before`]:{insetInlineStart:"50%"},[`&-in-view${t}-range-end:not(${t}-disabled):before`]:{insetInlineEnd:"50%"},[`&-in-view${t}-range-start:not(${t}-range-end) ${n}`]:{borderStartStartRadius:o,borderEndStartRadius:o,borderStartEndRadius:0,borderEndEndRadius:0},[`&-in-view${t}-range-end:not(${t}-range-start) ${n}`]:{borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:o,borderEndEndRadius:o},"&-disabled":{color:p,cursor:"not-allowed",[n]:{background:"transparent"},"&::before":{background:m}},[`&-disabled${t}-today ${n}::before`]:{borderColor:p}}},Zu=e=>{const{componentCls:t,pickerCellCls:n,pickerCellInnerCls:i,pickerYearMonthCellWidth:o,pickerControlIconSize:r,cellWidth:s,paddingSM:l,paddingXS:c,paddingXXS:u,colorBgContainer:d,lineWidth:h,lineType:p,borderRadiusLG:m,colorPrimary:f,colorTextHeading:g,colorSplit:y,pickerControlIconBorderWidth:v,colorIcon:b,textHeight:w,motionDurationMid:x,colorIconHover:C,fontWeightStrong:_,cellHeight:S,pickerCellPaddingVertical:k,colorTextDisabled:E,colorText:$,fontSize:M,motionDurationSlow:R,withoutTimeCellHeight:A,pickerQuarterPanelContentHeight:O,borderRadiusSM:j,colorTextLightSolid:T,cellHoverBg:N,timeColumnHeight:L,timeColumnWidth:I,timeCellHeight:D,controlItemBgActive:H,marginXXS:P,pickerDatePanelPaddingHorizontal:z,pickerControlIconMargin:F}=e,V=e.calc(s).mul(7).add(e.calc(z).mul(2)).equal();return{[t]:{"&-panel":{display:"inline-flex",flexDirection:"column",textAlign:"center",background:d,borderRadius:m,outline:"none","&-focused":{borderColor:f},"&-rtl":{[`${t}-prev-icon,\n ${t}-super-prev-icon`]:{transform:"rotate(45deg)"},[`${t}-next-icon,\n ${t}-super-next-icon`]:{transform:"rotate(-135deg)"},[`${t}-time-panel`]:{[`${t}-content`]:{direction:"ltr","> *":{direction:"rtl"}}}}},"&-decade-panel,\n &-year-panel,\n &-quarter-panel,\n &-month-panel,\n &-week-panel,\n &-date-panel,\n &-time-panel":{display:"flex",flexDirection:"column",width:V},"&-header":{display:"flex",padding:`0 ${a(c)}`,color:g,borderBottom:`${a(h)} ${p} ${y}`,"> *":{flex:"none"},button:{padding:0,color:b,lineHeight:a(w),background:"transparent",border:0,cursor:"pointer",transition:`color ${x}`,fontSize:"inherit",display:"inline-flex",alignItems:"center",justifyContent:"center","&:empty":{display:"none"}},"> button":{minWidth:"1.6em",fontSize:M,"&:hover":{color:C},"&:disabled":{opacity:.25,pointerEvents:"none"}},"&-view":{flex:"auto",fontWeight:_,lineHeight:a(w),"> button":{color:"inherit",fontWeight:"inherit",verticalAlign:"top","&:not(:first-child)":{marginInlineStart:c},"&:hover":{color:f}}}},"&-prev-icon,\n &-next-icon,\n &-super-prev-icon,\n &-super-next-icon":{position:"relative",width:r,height:r,"&::before":{position:"absolute",top:0,insetInlineStart:0,width:r,height:r,border:"0 solid currentcolor",borderBlockStartWidth:v,borderInlineStartWidth:v,content:'""'}},"&-super-prev-icon,\n &-super-next-icon":{"&::after":{position:"absolute",top:F,insetInlineStart:F,display:"inline-block",width:r,height:r,border:"0 solid currentcolor",borderBlockStartWidth:v,borderInlineStartWidth:v,content:'""'}},"&-prev-icon, &-super-prev-icon":{transform:"rotate(-45deg)"},"&-next-icon, &-super-next-icon":{transform:"rotate(135deg)"},"&-content":{width:"100%",tableLayout:"fixed",borderCollapse:"collapse","th, td":{position:"relative",minWidth:S,fontWeight:"normal"},th:{height:e.calc(S).add(e.calc(k).mul(2)).equal(),color:$,verticalAlign:"middle"}},"&-cell":Object.assign({padding:`${a(k)} 0`,color:E,cursor:"pointer","&-in-view":{color:$}},Yu(e)),"&-decade-panel,\n &-year-panel,\n &-quarter-panel,\n &-month-panel":{[`${t}-content`]:{height:e.calc(A).mul(4).equal()},[i]:{padding:`0 ${a(c)}`}},"&-quarter-panel":{[`${t}-content`]:{height:O}},"&-decade-panel":{[i]:{padding:`0 ${a(e.calc(c).div(2).equal())}`},[`${t}-cell::before`]:{display:"none"}},"&-year-panel,\n &-quarter-panel,\n &-month-panel":{[`${t}-body`]:{padding:`0 ${a(c)}`},[i]:{width:o}},"&-date-panel":{[`${t}-body`]:{padding:`${a(c)} ${a(z)}`},[`${t}-content th`]:{boxSizing:"border-box",padding:0}},"&-week-panel-row":{td:{"&:before":{transition:`background ${x}`},"&:first-child:before":{borderStartStartRadius:j,borderEndStartRadius:j},"&:last-child:before":{borderStartEndRadius:j,borderEndEndRadius:j}},"&:hover td:before":{background:N},"&-range-start td, &-range-end td, &-selected td, &-hover td":{[`&${n}`]:{"&:before":{background:f},[`&${t}-cell-week`]:{color:new Ee(T).setA(.5).toHexString()},[i]:{color:T}}},"&-range-hover td:before":{background:H}},"&-week-panel, &-date-panel-show-week":{[`${t}-body`]:{padding:`${a(c)} ${a(l)}`},[`${t}-content th`]:{width:"auto"}},"&-datetime-panel":{display:"flex",[`${t}-time-panel`]:{borderInlineStart:`${a(h)} ${p} ${y}`},[`${t}-date-panel,\n ${t}-time-panel`]:{transition:`opacity ${R}`},"&-active":{[`${t}-date-panel,\n ${t}-time-panel`]:{opacity:.3,"&-active":{opacity:1}}}},"&-time-panel":{width:"auto",minWidth:"auto",[`${t}-content`]:{display:"flex",flex:"auto",height:L},"&-column":{flex:"1 0 auto",width:I,margin:`${a(u)} 0`,padding:0,overflowY:"hidden",textAlign:"start",listStyle:"none",transition:`background ${x}`,overflowX:"hidden","&::-webkit-scrollbar":{width:8,backgroundColor:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e.colorTextTertiary,borderRadius:e.borderRadiusSM},"&":{scrollbarWidth:"thin",scrollbarColor:`${e.colorTextTertiary} transparent`},"&::after":{display:"block",height:`calc(100% - ${a(D)})`,content:'""'},"&:not(:first-child)":{borderInlineStart:`${a(h)} ${p} ${y}`},"&-active":{background:new Ee(H).setA(.2).toHexString()},"&:hover":{overflowY:"auto"},"> li":{margin:0,padding:0,[`&${t}-time-panel-cell`]:{marginInline:P,[`${t}-time-panel-cell-inner`]:{display:"block",width:e.calc(I).sub(e.calc(P).mul(2)).equal(),height:D,margin:0,paddingBlock:0,paddingInlineEnd:0,paddingInlineStart:e.calc(I).sub(D).div(2).equal(),color:$,lineHeight:a(D),borderRadius:j,cursor:"pointer",transition:`background ${x}`,"&:hover":{background:N}},"&-selected":{[`${t}-time-panel-cell-inner`]:{background:H}},"&-disabled":{[`${t}-time-panel-cell-inner`]:{color:E,background:"transparent",cursor:"not-allowed"}}}}}}}}},Gu=e=>{const{componentCls:t,textHeight:n,lineWidth:i,paddingSM:o,antCls:r,colorPrimary:s,cellActiveWithRangeBg:l,colorPrimaryBorder:c,lineType:u,colorSplit:d}=e;return{[`${t}-dropdown`]:{[`${t}-footer`]:{borderTop:`${a(i)} ${u} ${d}`,"&-extra":{padding:`0 ${a(o)}`,lineHeight:a(e.calc(n).sub(e.calc(i).mul(2)).equal()),textAlign:"start","&:not(:last-child)":{borderBottom:`${a(i)} ${u} ${d}`}}},[`${t}-panels + ${t}-footer ${t}-ranges`]:{justifyContent:"space-between"},[`${t}-ranges`]:{marginBlock:0,paddingInline:a(o),overflow:"hidden",textAlign:"start",listStyle:"none",display:"flex",justifyContent:"center",alignItems:"center","> li":{lineHeight:a(e.calc(n).sub(e.calc(i).mul(2)).equal()),display:"inline-block"},[`${t}-now-btn-disabled`]:{pointerEvents:"none",color:e.colorTextDisabled},[`${t}-preset > ${r}-tag-blue`]:{color:s,background:l,borderColor:c,cursor:"pointer"},[`${t}-ok`]:{paddingBlock:e.calc(i).mul(2).equal(),marginInlineStart:"auto"}}}}},qu=e=>{const{componentCls:t}=e;return{[t]:[Object.assign(Object.assign(Object.assign(Object.assign({},Ot(e)),jt(e)),Tt(e)),Nt(e)),{"&-outlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${a(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-filled":{[`&${t}-multiple ${t}-selection-item`]:{background:e.colorBgContainer,border:`${a(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}},"&-borderless":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${a(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-underlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${a(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}}}]}},Ku=(e,t)=>({padding:`${a(e)} ${a(t)}`}),Qu=e=>{const{componentCls:t,colorError:n,colorWarning:i}=e;return{[`${t}:not(${t}-disabled):not([disabled])`]:{[`&${t}-status-error`]:{[`${t}-active-bar`]:{background:n}},[`&${t}-status-warning`]:{[`${t}-active-bar`]:{background:i}}}}},Xu=e=>{var t;const{componentCls:n,antCls:i,paddingInline:o,lineWidth:s,lineType:l,colorBorder:c,borderRadius:u,motionDurationMid:d,colorTextDisabled:h,colorTextPlaceholder:p,fontSizeLG:m,inputFontSizeLG:f,fontSizeSM:g,inputFontSizeSM:y,controlHeightSM:v,paddingInlineSM:b,paddingXS:w,marginXS:x,colorIcon:C,lineWidthBold:_,colorPrimary:S,motionDurationSlow:k,zIndexPopup:E,paddingXXS:$,sizePopupArrow:M,colorBgElevated:R,borderRadiusLG:A,boxShadowSecondary:O,borderRadiusSM:j,colorSplit:T,cellHoverBg:N,presetsWidth:L,presetsMaxWidth:I,boxShadowPopoverArrow:D,fontHeight:H,lineHeightLG:P}=e;return[{[n]:Object.assign(Object.assign(Object.assign({},r(e)),Ku(e.paddingBlock,e.paddingInline)),{position:"relative",display:"inline-flex",alignItems:"center",lineHeight:1,borderRadius:u,transition:`border ${d}, box-shadow ${d}, background ${d}`,[`${n}-prefix`]:{flex:"0 0 auto",marginInlineEnd:e.inputAffixPadding},[`${n}-input`]:{position:"relative",display:"inline-flex",alignItems:"center",width:"100%","> input":Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",color:"inherit",fontSize:null!==(t=e.inputFontSize)&&void 0!==t?t:e.fontSize,lineHeight:e.lineHeight,transition:`all ${d}`},Dt(p)),{flex:"auto",minWidth:1,height:"auto",padding:0,background:"transparent",border:0,fontFamily:"inherit","&:focus":{boxShadow:"none",outline:0},"&[disabled]":{background:"transparent",color:h,cursor:"not-allowed"}}),"&-placeholder":{"> input":{color:p}}},"&-large":Object.assign(Object.assign({},Ku(e.paddingBlockLG,e.paddingInlineLG)),{[`${n}-input > input`]:{fontSize:null!=f?f:m,lineHeight:P}}),"&-small":Object.assign(Object.assign({},Ku(e.paddingBlockSM,e.paddingInlineSM)),{[`${n}-input > input`]:{fontSize:null!=y?y:g}}),[`${n}-suffix`]:{display:"flex",flex:"none",alignSelf:"center",marginInlineStart:e.calc(w).div(2).equal(),color:h,lineHeight:1,pointerEvents:"none",transition:`opacity ${d}, color ${d}`,"> *":{verticalAlign:"top","&:not(:last-child)":{marginInlineEnd:x}}},[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineEnd:0,color:h,lineHeight:1,transform:"translateY(-50%)",cursor:"pointer",opacity:0,transition:`opacity ${d}, color ${d}`,"> *":{verticalAlign:"top"},"&:hover":{color:C}},"&:hover":{[`${n}-clear`]:{opacity:1},[`${n}-suffix:not(:last-child)`]:{opacity:0}},[`${n}-separator`]:{position:"relative",display:"inline-block",width:"1em",height:m,color:h,fontSize:m,verticalAlign:"top",cursor:"default",[`${n}-focused &`]:{color:C},[`${n}-range-separator &`]:{[`${n}-disabled &`]:{cursor:"not-allowed"}}},"&-range":{position:"relative",display:"inline-flex",[`${n}-active-bar`]:{bottom:e.calc(s).mul(-1).equal(),height:_,background:S,opacity:0,transition:`all ${k} ease-out`,pointerEvents:"none"},[`&${n}-focused`]:{[`${n}-active-bar`]:{opacity:1}},[`${n}-range-separator`]:{alignItems:"center",padding:`0 ${a(w)}`,lineHeight:1}},"&-range, &-multiple":{[`${n}-clear`]:{insetInlineEnd:o},[`&${n}-small`]:{[`${n}-clear`]:{insetInlineEnd:b}}},"&-dropdown":Object.assign(Object.assign(Object.assign({},r(e)),Zu(e)),{pointerEvents:"none",position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:E,[`&${n}-dropdown-hidden`]:{display:"none"},"&-rtl":{direction:"rtl"},[`&${n}-dropdown-placement-bottomLeft,\n &${n}-dropdown-placement-bottomRight`]:{[`${n}-range-arrow`]:{top:0,display:"block",transform:"translateY(-100%)"}},[`&${n}-dropdown-placement-topLeft,\n &${n}-dropdown-placement-topRight`]:{[`${n}-range-arrow`]:{bottom:0,display:"block",transform:"translateY(100%) rotate(180deg)"}},[`&${i}-slide-up-appear, &${i}-slide-up-enter`]:{[`${n}-range-arrow${n}-range-arrow`]:{transition:"none"}},[`&${i}-slide-up-enter${i}-slide-up-enter-active${n}-dropdown-placement-topLeft,\n &${i}-slide-up-enter${i}-slide-up-enter-active${n}-dropdown-placement-topRight,\n &${i}-slide-up-appear${i}-slide-up-appear-active${n}-dropdown-placement-topLeft,\n &${i}-slide-up-appear${i}-slide-up-appear-active${n}-dropdown-placement-topRight`]:{animationName:$e},[`&${i}-slide-up-enter${i}-slide-up-enter-active${n}-dropdown-placement-bottomLeft,\n &${i}-slide-up-enter${i}-slide-up-enter-active${n}-dropdown-placement-bottomRight,\n &${i}-slide-up-appear${i}-slide-up-appear-active${n}-dropdown-placement-bottomLeft,\n &${i}-slide-up-appear${i}-slide-up-appear-active${n}-dropdown-placement-bottomRight`]:{animationName:Me},[`&${i}-slide-up-leave ${n}-panel-container`]:{pointerEvents:"none"},[`&${i}-slide-up-leave${i}-slide-up-leave-active${n}-dropdown-placement-topLeft,\n &${i}-slide-up-leave${i}-slide-up-leave-active${n}-dropdown-placement-topRight`]:{animationName:Re},[`&${i}-slide-up-leave${i}-slide-up-leave-active${n}-dropdown-placement-bottomLeft,\n &${i}-slide-up-leave${i}-slide-up-leave-active${n}-dropdown-placement-bottomRight`]:{animationName:Ae},[`${n}-panel > ${n}-time-panel`]:{paddingTop:$},[`${n}-range-wrapper`]:{display:"flex",position:"relative"},[`${n}-range-arrow`]:Object.assign(Object.assign({position:"absolute",zIndex:1,display:"none",paddingInline:e.calc(o).mul(1.5).equal(),boxSizing:"content-box",transition:`all ${k} ease-out`},Oe(e,R,D)),{"&:before":{insetInlineStart:e.calc(o).mul(1.5).equal()}}),[`${n}-panel-container`]:{overflow:"hidden",verticalAlign:"top",background:R,borderRadius:A,boxShadow:O,transition:`margin ${k}`,display:"inline-block",pointerEvents:"auto",[`${n}-panel-layout`]:{display:"flex",flexWrap:"nowrap",alignItems:"stretch"},[`${n}-presets`]:{display:"flex",flexDirection:"column",minWidth:L,maxWidth:I,ul:{height:0,flex:"auto",listStyle:"none",overflow:"auto",margin:0,padding:w,borderInlineEnd:`${a(s)} ${l} ${T}`,li:Object.assign(Object.assign({},je),{borderRadius:j,paddingInline:w,paddingBlock:e.calc(v).sub(H).div(2).equal(),cursor:"pointer",transition:`all ${k}`,"+ li":{marginTop:x},"&:hover":{background:N}})}},[`${n}-panels`]:{display:"inline-flex",flexWrap:"nowrap","&:last-child":{[`${n}-panel`]:{borderWidth:0}}},[`${n}-panel`]:{verticalAlign:"top",background:"transparent",borderRadius:0,borderWidth:0,[`${n}-content, table`]:{textAlign:"center"},"&-focused":{borderColor:c}}}}),"&-dropdown-range":{padding:`${a(e.calc(M).mul(2).div(3).equal())} 0`,"&-hidden":{display:"none"}},"&-rtl":{direction:"rtl",[`${n}-separator`]:{transform:"scale(-1, 1)"},[`${n}-footer`]:{"&-extra":{direction:"rtl"}}}})},Te(e,"slide-up"),Te(e,"slide-down"),Ne(e,"move-up"),Ne(e,"move-down")]},Ju=o("DatePicker",(e=>{const t=R(Lt(e),(e=>{const{componentCls:t,controlHeightLG:n,paddingXXS:i,padding:o}=e;return{pickerCellCls:`${t}-cell`,pickerCellInnerCls:`${t}-cell-inner`,pickerYearMonthCellWidth:e.calc(n).mul(1.5).equal(),pickerQuarterPanelContentHeight:e.calc(n).mul(1.4).equal(),pickerCellPaddingVertical:e.calc(i).add(e.calc(i).div(2)).equal(),pickerCellBorderGap:2,pickerControlIconSize:7,pickerControlIconMargin:4,pickerControlIconBorderWidth:1.5,pickerDatePanelPaddingHorizontal:e.calc(o).add(e.calc(i).div(2)).equal()}})(e),{inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[Gu(t),Xu(t),qu(t),Qu(t),Uu(t),It(e,{focusElCls:`${e.componentCls}-focused`})]}),(e=>Object.assign(Object.assign(Object.assign(Object.assign({},At(e)),(e=>{const{colorBgContainerDisabled:t,controlHeight:n,controlHeightSM:i,controlHeightLG:o,paddingXXS:r,lineWidth:a}=e,s=2*r,l=2*a,c=Math.min(n-s,n-l),u=Math.min(i-s,i-l),d=Math.min(o-s,o-l);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(r/2),cellHoverBg:e.controlItemBgHover,cellActiveWithRangeBg:e.controlItemBgActive,cellHoverWithRangeBg:new Ee(e.colorPrimary).lighten(35).toHexString(),cellRangeBorderColor:new Ee(e.colorPrimary).lighten(20).toHexString(),cellBgDisabled:t,timeColumnWidth:1.4*o,timeColumnHeight:224,timeCellHeight:28,cellWidth:1.5*i,cellHeight:i,textHeight:o,withoutTimeCellHeight:1.65*o,multipleItemBg:e.colorFillSecondary,multipleItemBorderColor:"transparent",multipleItemHeight:c,multipleItemHeightSM:u,multipleItemHeightLG:d,multipleSelectorBgDisabled:t,multipleItemColorDisabled:e.colorTextDisabled,multipleItemBorderColorDisabled:"transparent"}})(e)),le(e)),{presetsWidth:120,presetsMaxWidth:200,zIndexPopup:e.zIndexPopupBase+50}))),ed={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},td=window.React;var nd=function(e,t){return td.createElement(n,i({},e,{ref:t,icon:ed}))};const id=td.forwardRef(nd),od=(0,window.React.createContext)(null),rd=window.React,ad=window.React.useEffect,sd=window.React.useRef,ld=window.React.useState,cd=window.React.useMemo;var ud={width:0,height:0,left:0,top:0};const dd=window.React;function hd(e,t){var n=dd.useRef(e),i=dd.useState({}),o=x(i,2)[1];return[n.current,function(e){var i="function"==typeof e?e(n.current):e;i!==n.current&&t(i,n.current),n.current=i,o({})}]}const pd=window.React,md=window.React.useRef,fd=window.React.useState;var gd=Math.pow(.995,20);const yd=window.React.useRef,vd=window.React.useState;function bd(e){var t=vd(0),n=x(t,2),i=n[0],o=n[1],r=yd(0),a=yd();return a.current=e,Ce((function(){var e;null===(e=a.current)||void 0===e||e.call(a)}),[i]),function(){r.current===i&&(r.current+=1,o(r.current))}}const wd=window.React.useMemo;var xd={width:0,height:0,left:0,top:0,right:0};function Cd(e){var t;return e instanceof Map?(t={},e.forEach((function(e,n){t[n]=e}))):t=e,JSON.stringify(t)}function _d(e){return String(e).replace(/"/g,"TABS_DQ")}function Sd(e,t,n,i){return!(!n||i||!1===e||void 0===e&&(!1===t||null===t))}const kd=window.React;var Ed=kd.forwardRef((function(e,t){var n=e.prefixCls,i=e.editable,o=e.locale,r=e.style;return i&&!1!==i.showAdd?kd.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:r,"aria-label":(null==o?void 0:o.addAriaLabel)||"Add tab",onClick:function(e){i.onEdit("add",{event:e})}},i.addIcon||"+"):null}));const $d=window.React;var Md=$d.forwardRef((function(e,t){var n,i=e.position,o=e.prefixCls,r=e.extra;if(!r)return null;var a={};return"object"!==C(r)||$d.isValidElement(r)?a.right=r:a=r,"right"===i&&(n=a.right),"left"===i&&(n=a.left),n?$d.createElement("div",{className:"".concat(o,"-extra-content"),ref:t},n):null}));const Rd=window.React,Ad=window.React.useEffect,Od=window.React.useState;var jd=Rd.forwardRef((function(e,t){var n=e.prefixCls,o=e.id,r=e.tabs,a=e.locale,s=e.mobile,c=e.more,u=void 0===c?{}:c,d=e.style,h=e.className,p=e.editable,m=e.tabBarGutter,f=e.rtl,g=e.removeAriaLabel,y=e.onTabClick,v=e.getPopupContainer,b=e.popupClassName,w=Od(!1),C=x(w,2),S=C[0],k=C[1],E=Od(null),$=x(E,2),M=$[0],R=$[1],A=u.icon,O=void 0===A?"More":A,j="".concat(o,"-more-popup"),T="".concat(n,"-dropdown"),N=null!==M?"".concat(j,"-").concat(M):null,L=null==a?void 0:a.dropdownAriaLabel,I=Rd.createElement(Ht,{onClick:function(e){var t=e.key,n=e.domEvent;y(t,n),k(!1)},prefixCls:"".concat(T,"-menu"),id:j,tabIndex:-1,role:"listbox","aria-activedescendant":N,selectedKeys:[M],"aria-label":void 0!==L?L:"expanded dropdown"},r.map((function(e){var t=e.closable,n=e.disabled,i=e.closeIcon,r=e.key,a=e.label,s=Sd(t,i,p,n);return Rd.createElement(Pt,{key:r,id:"".concat(j,"-").concat(r),role:"option","aria-controls":o&&"".concat(o,"-panel-").concat(r),disabled:n},Rd.createElement("span",null,a),s&&Rd.createElement("button",{type:"button","aria-label":g||"remove",tabIndex:0,className:"".concat(T,"-menu-item-remove"),onClick:function(e){e.stopPropagation(),function(e,t){e.preventDefault(),e.stopPropagation(),p.onEdit("remove",{key:t,event:e})}(e,r)}},i||p.removeIcon||"×"))})));function D(e){for(var t=r.filter((function(e){return!e.disabled})),n=t.findIndex((function(e){return e.key===M}))||0,i=t.length,o=0;ot?"left":"right"})})),I=x(L,2),H=I[0],P=I[1],z=hd(0,(function(e,t){!N&&y&&y({direction:e>t?"top":"bottom"})})),F=x(z,2),V=F[0],B=F[1],W=Pd([0,0]),U=x(W,2),Y=U[0],Z=U[1],G=Pd([0,0]),q=x(G,2),K=q[0],Q=q[1],X=Pd([0,0]),J=x(X,2),ee=J[0],te=J[1],ne=Pd([0,0]),ie=x(ne,2),oe=ie[0],re=ie[1],ae=function(e){var t=yd([]),n=vd({}),i=x(n,2)[1],o=yd("function"==typeof e?e():e),r=bd((function(){var e=o.current;t.current.forEach((function(t){e=t(e)})),t.current=[],o.current=e,i({})}));return[o.current,function(e){t.current.push(e),r()}]}(new Map),se=x(ae,2),le=se[0],ce=se[1],ue=function(e,t,n){return cd((function(){for(var n,i=new Map,o=t.get(null===(n=e[0])||void 0===n?void 0:n.key)||ud,r=o.left+o.width,a=0;abe?be:e}N&&c?(ve=0,be=Math.max(0,he-ge)):(ve=Math.min(0,ge-he),be=0);var Ce=Hd(null),_e=Pd(),Se=x(_e,2),Ee=Se[0],$e=Se[1];function Me(){$e(Date.now())}function Re(){Ce.current&&clearTimeout(Ce.current)}!function(e,t){var n=fd(),i=x(n,2),o=i[0],r=i[1],a=fd(0),s=x(a,2),l=s[0],c=s[1],u=fd(0),d=x(u,2),h=d[0],p=d[1],m=fd(),f=x(m,2),g=f[0],y=f[1],v=md(),b=md(),w=md(null);w.current={onTouchStart:function(e){var t=e.touches[0],n=t.screenX,i=t.screenY;r({x:n,y:i}),window.clearInterval(v.current)},onTouchMove:function(e){if(o){var n=e.touches[0],i=n.screenX,a=n.screenY;r({x:i,y:a});var s=i-o.x,u=a-o.y;t(s,u);var d=Date.now();c(d),p(d-l),y({x:s,y:u})}},onTouchEnd:function(){if(o&&(r(null),y(null),g)){var e=g.x/h,n=g.y/h,i=Math.abs(e),a=Math.abs(n);if(Math.max(i,a)<.1)return;var s=e,l=n;v.current=window.setInterval((function(){Math.abs(s)<.01&&Math.abs(l)<.01?window.clearInterval(v.current):t(20*(s*=gd),20*(l*=gd))}),20)}},onWheel:function(e){var n=e.deltaX,i=e.deltaY,o=0,r=Math.abs(n),a=Math.abs(i);r===a?o="x"===b.current?n:i:r>a?(o=n,b.current="x"):(o=i,b.current="y"),t(-o,-o)&&e.preventDefault()}},pd.useEffect((function(){function t(e){w.current.onTouchMove(e)}function n(e){w.current.onTouchEnd(e)}return document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",n,{passive:!0}),e.current.addEventListener("touchstart",(function(e){w.current.onTouchStart(e)}),{passive:!0}),e.current.addEventListener("wheel",(function(e){w.current.onWheel(e)}),{passive:!1}),function(){document.removeEventListener("touchmove",t),document.removeEventListener("touchend",n)}}),[])}(A,(function(e,t){function n(e,t){e((function(e){return xe(e+t)}))}return!!fe&&(N?n(P,e):n(B,t),Re(),Me(),!0)})),Dd((function(){return Re(),Ee&&(Ce.current=setTimeout((function(){$e(0)}),100)),Re}),[Ee]);var Ae=function(e,t,n,i,o,r,a){var s,l,c,u=a.tabs,d=a.tabPosition,h=a.rtl;return["top","bottom"].includes(d)?(s="width",l=h?"right":"left",c=Math.abs(n)):(s="height",l="top",c=-n),wd((function(){if(!u.length)return[0,0];for(var n=u.length,i=n,o=0;oMath.floor(c+t)){i=o-1;break}}for(var a=0,d=n-1;d>=0;d-=1)if((e.get(u[d].key)||xd)[l]i?[0,-1]:[a,i]}),[e,t,i,o,r,c,d,u.map((function(e){return e.key})).join("_"),h])}(ue,ge,N?H:V,he,pe,me,E(E({},e),{},{tabs:C})),Oe=x(Ae,2),je=Oe[0],Te=Oe[1],Ne=M((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=ue.get(e)||{width:0,height:0,left:0,right:0,top:0};if(N){var n=H;c?t.rightH+ge&&(n=t.right+t.width-ge):t.left<-H?n=-t.left:t.left+t.width>-H+ge&&(n=-(t.left+t.width-ge)),B(0),P(xe(n))}else{var i=V;t.top<-V?i=-t.top:t.top+t.height>-V+ge&&(i=-(t.top+t.height-ge)),P(0),B(xe(i))}})),Le=Pd(),Ie=x(Le,2),De=Ie[0],He=Ie[1],Pe=Pd(!1),ze=x(Pe,2),Fe=ze[0],Ve=ze[1],Be=C.filter((function(e){return!e.disabled})).map((function(e){return e.key})),We=function(e){var t=Be.indexOf(De||s),n=Be.length,i=Be[(t+e+n)%n];He(i)},Ue=function(e,t){var n=Be.indexOf(e),i=C.find((function(t){return t.key===e}));Sd(null==i?void 0:i.closable,null==i?void 0:i.closeIcon,d,null==i?void 0:i.disabled)&&(t.preventDefault(),t.stopPropagation(),d.onEdit("remove",{key:e,event:t}),n===Be.length-1?We(-1):We(1))},Ye=function(e){var t=e.code,n=c&&N,i=Be[0],o=Be[Be.length-1];switch(t){case"ArrowLeft":N&&We(n?1:-1);break;case"ArrowRight":N&&We(n?-1:1);break;case"ArrowUp":e.preventDefault(),N||We(-1);break;case"ArrowDown":e.preventDefault(),N||We(1);break;case"Home":e.preventDefault(),He(i);break;case"End":e.preventDefault(),He(o);break;case"Enter":case"Space":e.preventDefault(),g(null!=De?De:s,e);break;case"Backspace":case"Delete":Ue(De,e)}},Ze={};N?Ze[c?"marginRight":"marginLeft"]=m:Ze.marginTop=m;var Ge=C.map((function(e,t){var n=e.key;return Id.createElement(Ld,{id:r,prefixCls:w,key:n,tab:e,style:0===t?void 0:Ze,closable:e.closable,editable:d,active:n===s,focus:n===De,renderWrapper:f,removeAriaLabel:null==h?void 0:h.removeAriaLabel,tabCount:Be.length,currentPosition:t+1,onClick:function(e){g(n,e)},onKeyDown:Ye,onFocus:function(){Fe||He(n),Ne(n),Me(),A.current&&(c||(A.current.scrollLeft=0),A.current.scrollTop=0)},onBlur:function(){He(void 0)},onMouseDown:function(e){return function(e,t){Ve(!0),1===t.button&&Ue(e,t)}(n,e)},onMouseUp:function(){Ve(!1)}})})),qe=function(){return ce((function(){var e,t=new Map,n=null===(e=O.current)||void 0===e?void 0:e.getBoundingClientRect();return C.forEach((function(e){var i,o=e.key,r=null===(i=O.current)||void 0===i?void 0:i.querySelector('[data-node-key="'.concat(_d(o),'"]'));if(r){var a=function(e,t){var n=e.offsetWidth,i=e.offsetHeight,o=e.offsetTop,r=e.offsetLeft,a=e.getBoundingClientRect(),s=a.width,l=a.height,c=a.left,u=a.top;return Math.abs(s-n)<1?[s,l,c-t.left,u-t.top]:[n,i,r,o]}(r,n),s=x(a,4),l=s[0],c=s[1],u=s[2],d=s[3];t.set(o,{width:l,height:c,left:u,top:d})}})),t}))};Dd((function(){qe()}),[C.map((function(e){return e.key})).join("_")]);var Ke=bd((function(){var e=zd(S),t=zd(k),n=zd(R);Z([e[0]-t[0]-n[0],e[1]-t[1]-n[1]]);var i=zd(T);te(i);var o=zd(j);re(o);var r=zd(O);Q([r[0]-i[0],r[1]-i[1]]),qe()})),Qe=C.slice(0,je),Xe=C.slice(Te+1),Je=[].concat($(Qe),$(Xe)),et=ue.get(s),tt=function(e){var t=e.activeTabOffset,n=e.horizontal,i=e.rtl,o=e.indicator,r=void 0===o?{}:o,a=r.size,s=r.align,l=void 0===s?"center":s,c=ld(),u=x(c,2),d=u[0],h=u[1],p=sd(),m=rd.useCallback((function(e){return"function"==typeof a?a(e):"number"==typeof a?a:e}),[a]);function f(){we.cancel(p.current)}return ad((function(){var e={};if(t)if(n){e.width=m(t.width);var o=i?"right":"left";"start"===l&&(e[o]=t[o]),"center"===l&&(e[o]=t[o]+t.width/2,e.transform=i?"translateX(50%)":"translateX(-50%)"),"end"===l&&(e[o]=t[o]+t.width,e.transform="translateX(-100%)")}else e.height=m(t.height),"start"===l&&(e.top=t.top),"center"===l&&(e.top=t.top+t.height/2,e.transform="translateY(-50%)"),"end"===l&&(e.top=t.top+t.height,e.transform="translateY(-100%)");return f(),p.current=we((function(){d&&e&&Object.keys(e).every((function(t){var n=e[t],i=d[t];return"number"==typeof n&&"number"==typeof i?Math.round(n)===Math.round(i):n===i}))||h(e)})),f}),[JSON.stringify(t),n,i,l,m]),{style:d}}({activeTabOffset:et,horizontal:N,indicator:v,rtl:c}),nt=tt.style;Dd((function(){Ne()}),[s,ve,be,Cd(et),Cd(ue),N]),Dd((function(){Ke()}),[c]);var it,ot,rt,at,st=!!Je.length,lt="".concat(w,"-nav-wrap");return N?c?(ot=H>0,it=H!==be):(it=H<0,ot=H!==ve):(rt=V<0,at=V!==ve),Id.createElement(ke,{onResize:Ke},Id.createElement("div",{ref:D(t,S),role:"tablist","aria-orientation":N?"horizontal":"vertical",className:l("".concat(w,"-nav"),n),style:o,onKeyDown:function(){Me()}},Id.createElement(Md,{ref:k,position:"left",extra:u,prefixCls:w}),Id.createElement(ke,{onResize:Ke},Id.createElement("div",{className:l(lt,_(_(_(_({},"".concat(lt,"-ping-left"),it),"".concat(lt,"-ping-right"),ot),"".concat(lt,"-ping-top"),rt),"".concat(lt,"-ping-bottom"),at)),ref:A},Id.createElement(ke,{onResize:Ke},Id.createElement("div",{ref:O,className:"".concat(w,"-nav-list"),style:{transform:"translate(".concat(H,"px, ").concat(V,"px)"),transition:Ee?"none":void 0}},Ge,Id.createElement(Ed,{ref:T,prefixCls:w,locale:h,editable:d,style:E(E({},0===Ge.length?void 0:Ze),{},{visibility:st?"hidden":null})}),Id.createElement("div",{className:l("".concat(w,"-ink-bar"),_({},"".concat(w,"-ink-bar-animated"),a.inkBar)),style:nt}))))),Id.createElement(Td,i({},e,{removeAriaLabel:null==h?void 0:h.removeAriaLabel,ref:j,prefixCls:w,tabs:Je,className:!st&&ye,tabMoving:!!Ee})),Id.createElement(Md,{ref:R,position:"right",extra:u,prefixCls:w})))}));const Bd=window.React;var Wd=Bd.forwardRef((function(e,t){var n=e.prefixCls,i=e.className,o=e.style,r=e.id,a=e.active,s=e.tabKey,c=e.children;return Bd.createElement("div",{id:r&&"".concat(r,"-panel-").concat(s),role:"tabpanel",tabIndex:a?0:-1,"aria-labelledby":r&&"".concat(r,"-tab-").concat(s),"aria-hidden":!a,style:o,className:l(n,a&&"".concat(n,"-active"),i),ref:t},c)})),Ud=["renderTabBar"],Yd=["label","key"];const Zd=window.React;var Gd=function(e){var t=e.renderTabBar,n=k(e,Ud),o=Zd.useContext(od).tabs;return t?t(E(E({},n),{},{panes:o.map((function(e){var t=e.label,n=e.key,o=k(e,Yd);return Zd.createElement(Wd,i({tab:t,key:n,tabKey:n},o))}))}),Vd):Zd.createElement(Vd,n)},qd=["key","forceRender","style","className","destroyInactiveTabPane"];const Kd=window.React;var Qd=function(e){var t=e.id,n=e.activeKey,o=e.animated,r=e.tabPosition,a=e.destroyInactiveTabPane,s=Kd.useContext(od),u=s.prefixCls,d=s.tabs,h=o.tabPane,p="".concat(u,"-tabpane");return Kd.createElement("div",{className:l("".concat(u,"-content-holder"))},Kd.createElement("div",{className:l("".concat(u,"-content"),"".concat(u,"-content-").concat(r),_({},"".concat(u,"-content-animated"),h))},d.map((function(e){var r=e.key,s=e.forceRender,u=e.style,d=e.className,m=e.destroyInactiveTabPane,f=k(e,qd),g=r===n;return Kd.createElement(c,i({key:r,visible:g,forceRender:s,removeOnLeave:!(!a&&!m),leavedClassName:"".concat(p,"-hidden")},o.tabPaneMotion),(function(e,n){var o=e.style,a=e.className;return Kd.createElement(Wd,i({},f,{prefixCls:p,id:t,tabKey:r,animated:h,active:g,style:E(E({},u),o),className:l(d,a),ref:n}))}))}))))},Xd=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","more","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"];const Jd=window.React,eh=window.React.useEffect,th=window.React.useState;var nh=0,ih=Jd.forwardRef((function(e,t){var n=e.id,o=e.prefixCls,r=void 0===o?"rc-tabs":o,a=e.className,s=e.items,c=e.direction,u=e.activeKey,d=e.defaultActiveKey,h=e.editable,p=e.animated,m=e.tabPosition,f=void 0===m?"top":m,g=e.tabBarGutter,y=e.tabBarStyle,v=e.tabBarExtraContent,b=e.locale,w=e.more,S=e.destroyInactiveTabPane,$=e.renderTabBar,M=e.onChange,R=e.onTabClick,A=e.onTabScroll,O=e.getPopupContainer,j=e.popupClassName,T=e.indicator,N=k(e,Xd),L=Jd.useMemo((function(){return(s||[]).filter((function(e){return e&&"object"===C(e)&&"key"in e}))}),[s]),I="rtl"===c,D=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{inkBar:!0,tabPane:!1};return(e=!1===t?{inkBar:!1,tabPane:!1}:!0===t?{inkBar:!0,tabPane:!1}:E({inkBar:!0},"object"===C(t)?t:{})).tabPaneMotion&&void 0===e.tabPane&&(e.tabPane=!0),!e.tabPaneMotion&&e.tabPane&&(e.tabPane=!1),e}(p),H=th(!1),P=x(H,2),z=P[0],F=P[1];eh((function(){F(Le())}),[]);var V=de((function(){var e;return null===(e=L[0])||void 0===e?void 0:e.key}),{value:u,defaultValue:d}),B=x(V,2),W=B[0],U=B[1],Y=th((function(){return L.findIndex((function(e){return e.key===W}))})),Z=x(Y,2),G=Z[0],q=Z[1];eh((function(){var e,t=L.findIndex((function(e){return e.key===W}));-1===t&&(t=Math.max(0,Math.min(G,L.length-1)),U(null===(e=L[t])||void 0===e?void 0:e.key)),q(t)}),[L.map((function(e){return e.key})).join("_"),W,G]);var K=de(null,{value:n}),Q=x(K,2),X=Q[0],J=Q[1];eh((function(){n||(J("rc-tabs-".concat(nh)),nh+=1)}),[]);var ee={id:X,activeKey:W,animated:D,tabPosition:f,rtl:I,mobile:z},te=E(E({},ee),{},{editable:h,locale:b,more:w,tabBarGutter:g,onTabClick:function(e,t){null==R||R(e,t);var n=e!==W;U(e),n&&(null==M||M(e))},onTabScroll:A,extra:v,style:y,panes:null,getPopupContainer:O,popupClassName:j,indicator:T});return Jd.createElement(od.Provider,{value:{tabs:L,prefixCls:r}},Jd.createElement("div",i({ref:t,id:n,className:l(r,"".concat(r,"-").concat(f),_(_(_({},"".concat(r,"-mobile"),z),"".concat(r,"-editable"),h),"".concat(r,"-rtl"),I),a)},N),Jd.createElement(Gd,i({},te,{renderTabBar:$})),Jd.createElement(Qd,i({destroyInactiveTabPane:S},ee,{animated:D}))))}));const oh={motionAppear:!1,motionEnter:!0,motionLeave:!0};var rh=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[Te(e,"slide-up"),Te(e,"slide-down")]]},lh=e=>{const{componentCls:t,tabsCardPadding:n,cardBg:i,cardGutter:o,colorBorderSecondary:r,itemSelectedColor:s}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:i,border:`${a(e.lineWidth)} ${e.lineType} ${r}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:s,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:Ie(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:"none"},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:a(o)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:a(o)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${a(e.borderRadiusLG)} 0 0 ${a(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},ch=e=>{const{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:i}=e;return{[`${t}-dropdown`]:Object.assign(Object.assign({},r(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${a(i)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":Object.assign(Object.assign({},je),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${a(e.paddingXXS)} ${a(e.paddingSM)}`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},uh=e=>{const{componentCls:t,margin:n,colorBorderSecondary:i,horizontalMargin:o,verticalItemPadding:r,verticalItemMargin:s,calc:l}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:o,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${a(e.lineWidth)} ${e.lineType} ${i}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:`width ${e.motionDurationSlow}, left ${e.motionDurationSlow},\n right ${e.motionDurationSlow}`}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav,\n > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:"column",minWidth:l(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:r,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:s},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:`height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:a(l(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${a(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:l(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${a(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},dh=e=>{const{componentCls:t,cardPaddingSM:n,cardPaddingLG:i,cardHeightSM:o,cardHeightLG:r,horizontalItemPaddingSM:s,horizontalItemPaddingLG:l}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:s,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:l,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:o,minHeight:o}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${a(e.borderRadius)} ${a(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${a(e.borderRadius)} ${a(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${a(e.borderRadius)} ${a(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${a(e.borderRadius)} 0 0 ${a(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:i},[`${t}-nav-add`]:{minWidth:r,minHeight:r}}}}}},hh=e=>{const{componentCls:t,itemActiveColor:n,itemHoverColor:i,iconCls:o,tabsHorizontalItemMargin:r,horizontalItemPadding:a,itemSelectedColor:s,itemColor:l}=e,c=`${t}-tab`;return{[c]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:a,fontSize:e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:l,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:"none",transition:`all ${e.motionDurationSlow}`,[`${c}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":Object.assign({flex:"none",lineHeight:1,marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading}},q(e)),"&:hover":{color:i},[`&${c}-active ${c}-btn`]:{color:s,textShadow:e.tabsActiveTextShadow},[`&${c}-focus ${c}-btn:focus-visible`]:Ie(e),[`&${c}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${c}-disabled ${c}-btn, &${c}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${c}-remove ${o}`]:{margin:0,verticalAlign:"middle"},[`${o}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${c} + ${c}`]:{margin:{_skip_check_:!0,value:r}}}},ph=e=>{const{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:i,cardGutter:o,calc:r}=e,s=`${t}-rtl`;return{[s]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:n},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[i]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:a(e.marginSM)}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:a(e.marginXS)},marginLeft:{_skip_check_:!0,value:a(r(e.marginXXS).mul(-1).equal())},[i]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:o},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},mh=e=>{const{componentCls:t,tabsCardPadding:n,cardHeight:i,cardGutter:o,itemHoverColor:s,itemActiveColor:l,colorBorderSecondary:c}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},r(e)),{display:"flex",[`> ${t}-nav, > div > ${t}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${t}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${t}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${t}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${t}-nav-more`]:{position:"relative",padding:n,background:"transparent",border:0,color:e.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:Object.assign({minWidth:i,minHeight:i,marginLeft:{_skip_check_:!0,value:o},background:"transparent",border:`${a(e.lineWidth)} ${e.lineType} ${c}`,borderRadius:`${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:s},"&:active, &:focus:not(:focus-visible)":{color:l}},q(e,-3))},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"}}),hh(e)),{[`${t}-content`]:{position:"relative",width:"100%"},[`${t}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-tabpane`]:Object.assign(Object.assign({},q(e)),{"&-hidden":{display:"none"}})}),[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:"auto"}}}}}},fh=o("Tabs",(e=>{const t=R(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${a(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${a(e.horizontalItemGutter)}`});return[dh(t),ph(t),uh(t),ch(t),lh(t),mh(t),sh(t)]}),(e=>{const{cardHeight:t,cardHeightSM:n,cardHeightLG:i,controlHeight:o,controlHeightLG:r}=e,a=t||r,s=n||o,l=i||r+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:a,cardHeightSM:s,cardHeightLG:l,cardPadding:`${(a-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(s-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(l-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}}));var gh=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{var n,i,o,r,a,s,c,u,d,h,p;const{type:m,className:f,rootClassName:g,size:y,onEdit:v,hideAdd:b,centered:w,addIcon:x,removeIcon:C,moreIcon:_,more:S,popupClassName:k,children:E,items:$,animated:M,style:R,indicatorSize:A,indicator:O,destroyInactiveTabPane:N,destroyOnHidden:L}=e,I=gh(e,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","removeIcon","moreIcon","more","popupClassName","children","items","animated","style","indicatorSize","indicator","destroyInactiveTabPane","destroyOnHidden"]),{prefixCls:D}=I,{direction:H,tabs:P,getPrefixCls:z,getPopupContainer:F}=yh.useContext(j),V=z("tabs",D),B=T(V),[W,U,Y]=fh(V,B),Z=yh.useRef(null);let G;yh.useImperativeHandle(t,(()=>({nativeElement:Z.current}))),"editable-card"===m&&(G={onEdit:(e,{key:t,event:n})=>{null==v||v("add"===e?n:t,e)},removeIcon:null!==(n=null!=C?C:null==P?void 0:P.removeIcon)&&void 0!==n?n:yh.createElement(wt,null),addIcon:(null!=x?x:null==P?void 0:P.addIcon)||yh.createElement(id,null),showAdd:!0!==b});const q=z(),K=De(y),Q=function(e,t){return e?e.map((e=>{var t;const n=null!==(t=e.destroyOnHidden)&&void 0!==t?t:e.destroyInactiveTabPane;return Object.assign(Object.assign({},e),{destroyInactiveTabPane:n})})):function(e){return e.filter((e=>e))}(ge(t).map((e=>{if(ah.isValidElement(e)){const{key:t,props:n}=e,i=n||{},{tab:o}=i,r=rh(i,["tab"]);return Object.assign(Object.assign({key:String(t)},r),{label:o})}return null})))}($,E),X=function(e,t={inkBar:!0,tabPane:!1}){let n;return n=!1===t?{inkBar:!1,tabPane:!1}:!0===t?{inkBar:!0,tabPane:!0}:Object.assign({inkBar:!0},"object"==typeof t?t:{}),n.tabPane&&(n.tabPaneMotion=Object.assign(Object.assign({},oh),{motionName:ee(e,"switch")})),n}(V,M),J=Object.assign(Object.assign({},null==P?void 0:P.style),R),te={align:null!==(i=null==O?void 0:O.align)&&void 0!==i?i:null===(o=null==P?void 0:P.indicator)||void 0===o?void 0:o.align,size:null!==(c=null!==(a=null!==(r=null==O?void 0:O.size)&&void 0!==r?r:A)&&void 0!==a?a:null===(s=null==P?void 0:P.indicator)||void 0===s?void 0:s.size)&&void 0!==c?c:null==P?void 0:P.indicatorSize};return W(yh.createElement(ih,Object.assign({ref:Z,direction:H,getPopupContainer:F},I,{items:Q,className:l({[`${V}-${K}`]:K,[`${V}-card`]:["card","editable-card"].includes(m),[`${V}-editable-card`]:"editable-card"===m,[`${V}-centered`]:w},null==P?void 0:P.className,f,g,U,Y,B),popupClassName:l(k,U,Y,B),style:J,editable:G,more:Object.assign({icon:null!==(p=null!==(h=null!==(d=null===(u=null==P?void 0:P.more)||void 0===u?void 0:u.icon)&&void 0!==d?d:null==P?void 0:P.moreIcon)&&void 0!==h?h:_)&&void 0!==p?p:yh.createElement(Ft,null),transitionName:`${q}-slide-up`},S),prefixCls:V,animated:X,indicator:te,destroyInactiveTabPane:null!=L?L:N})))}));vh.TabPane=()=>null;const bh=vh;var wh=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{var{prefixCls:t,className:n,hoverable:i=!0}=e,o=wh(e,["prefixCls","className","hoverable"]);const{getPrefixCls:r}=xh.useContext(j),a=r("card",t),s=l(`${a}-grid`,n,{[`${a}-grid-hoverable`]:i});return xh.createElement("div",Object.assign({},o,{className:s}))},_h=e=>{const{antCls:t,componentCls:n,headerHeight:i,headerPadding:o,tabsMarginBottom:r}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:i,marginBottom:-1,padding:`0 ${a(o)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${a(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)} 0 0`},ne()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},je),{[`\n > ${n}-typography,\n > ${n}-typography-edit-content\n `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:r,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${a(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})},Sh=e=>{const{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:i,lineWidth:o}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:`\n ${a(o)} 0 0 0 ${n},\n 0 ${a(o)} 0 0 ${n},\n ${a(o)} ${a(o)} 0 0 ${n},\n ${a(o)} 0 0 0 ${n} inset,\n 0 ${a(o)} 0 0 ${n} inset;\n `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:i}}},kh=e=>{const{componentCls:t,iconCls:n,actionsLiMargin:i,cardActionsIconSize:o,colorBorderSecondary:r,actionsBg:s}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:s,borderTop:`${a(e.lineWidth)} ${e.lineType} ${r}`,display:"flex",borderRadius:`0 0 ${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)}`},ne()),{"& > li":{margin:i,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:a(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:o,lineHeight:a(e.calc(o).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${a(e.lineWidth)} ${e.lineType} ${r}`}}})},Eh=e=>Object.assign(Object.assign({margin:`${a(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},ne()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},je),"&-description":{color:e.colorTextDescription}}),$h=e=>{const{componentCls:t,colorFillAlter:n,headerPadding:i,bodyPadding:o}=e;return{[`${t}-head`]:{padding:`0 ${a(i)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${a(e.padding)} ${a(o)}`}}},Mh=e=>{const{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}},Rh=e=>{const{componentCls:t,cardShadow:n,cardHeadPadding:i,colorBorderSecondary:o,boxShadowTertiary:s,bodyPadding:l,extraColor:c}=e;return{[t]:Object.assign(Object.assign({},r(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:s},[`${t}-head`]:_h(e),[`${t}-extra`]:{marginInlineStart:"auto",color:c,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:Object.assign({padding:l,borderRadius:`0 0 ${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)}`},ne()),[`${t}-grid`]:Sh(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:kh(e),[`${t}-meta`]:Eh(e)}),[`${t}-bordered`]:{border:`${a(e.lineWidth)} ${e.lineType} ${o}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:i}}},[`${t}-type-inner`]:$h(e),[`${t}-loading`]:Mh(e),[`${t}-rtl`]:{direction:"rtl"}}},Ah=e=>{const{componentCls:t,bodyPaddingSM:n,headerPaddingSM:i,headerHeightSM:o,headerFontSizeSM:r}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:o,padding:`0 ${a(i)}`,fontSize:r,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}},Oh=o("Card",(e=>{const t=R(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[Rh(t),Ah(t)]}),(e=>{var t,n;return{headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!==(t=e.bodyPadding)&&void 0!==t?t:e.paddingLG,headerPadding:null!==(n=e.headerPadding)&&void 0!==n?n:e.paddingLG}}));var jh=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{actionClasses:t,actions:n=[],actionStyle:i}=e;return Th.createElement("ul",{className:t,style:i},n.map(((e,t)=>{const i=`action-${t}`;return Th.createElement("li",{style:{width:100/n.length+"%"},key:i},Th.createElement("span",null,e))})))},Lh=Th.forwardRef(((e,t)=>{const{prefixCls:n,className:i,rootClassName:o,style:r,extra:a,headStyle:s={},bodyStyle:c={},title:u,loading:d,bordered:h,variant:p,size:m,type:f,cover:g,actions:y,tabList:v,children:b,activeTabKey:w,defaultActiveTabKey:x,tabBarExtraContent:C,hoverable:_,tabProps:S={},classNames:k,styles:E}=e,$=jh(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:M,direction:R,card:A}=Th.useContext(j),[O]=He("card",p,h),T=e=>{var t;return l(null===(t=null==A?void 0:A.classNames)||void 0===t?void 0:t[e],null==k?void 0:k[e])},N=e=>{var t;return Object.assign(Object.assign({},null===(t=null==A?void 0:A.styles)||void 0===t?void 0:t[e]),null==E?void 0:E[e])},L=Th.useMemo((()=>{let e=!1;return Th.Children.forEach(b,(t=>{(null==t?void 0:t.type)===Ch&&(e=!0)})),e}),[b]),I=M("card",n),[D,H,P]=Oh(I),z=Th.createElement(Zo,{loading:!0,active:!0,paragraph:{rows:4},title:!1},b),F=void 0!==w,V=Object.assign(Object.assign({},S),{[F?"activeKey":"defaultActiveKey"]:F?w:x,tabBarExtraContent:C});let B;const U=De(m),Y=U&&"default"!==U?U:"large",Z=v?Th.createElement(bh,Object.assign({size:Y},V,{className:`${I}-head-tabs`,onChange:t=>{var n;null===(n=e.onTabChange)||void 0===n||n.call(e,t)},items:v.map((e=>{var{tab:t}=e,n=jh(e,["tab"]);return Object.assign({label:t},n)}))})):null;if(u||a||Z){const e=l(`${I}-head`,T("header")),t=l(`${I}-head-title`,T("title")),n=l(`${I}-extra`,T("extra")),i=Object.assign(Object.assign({},s),N("header"));B=Th.createElement("div",{className:e,style:i},Th.createElement("div",{className:`${I}-head-wrapper`},u&&Th.createElement("div",{className:t,style:N("title")},u),a&&Th.createElement("div",{className:n,style:N("extra")},a)),Z)}const G=l(`${I}-cover`,T("cover")),q=g?Th.createElement("div",{className:G,style:N("cover")},g):null,K=l(`${I}-body`,T("body")),Q=Object.assign(Object.assign({},c),N("body")),X=Th.createElement("div",{className:K,style:Q},d?z:b),J=l(`${I}-actions`,T("actions")),ee=(null==y?void 0:y.length)?Th.createElement(Nh,{actionClasses:J,actionStyle:N("actions"),actions:y}):null,te=W($,["onTabChange"]),ne=l(I,null==A?void 0:A.className,{[`${I}-loading`]:d,[`${I}-bordered`]:"borderless"!==O,[`${I}-hoverable`]:_,[`${I}-contain-grid`]:L,[`${I}-contain-tabs`]:null==v?void 0:v.length,[`${I}-${U}`]:U,[`${I}-type-${f}`]:!!f,[`${I}-rtl`]:"rtl"===R},i,o,H,P),ie=Object.assign(Object.assign({},null==A?void 0:A.style),r);return D(Th.createElement("div",Object.assign({ref:t},te,{className:ne,style:ie}),B,q,X,ee))}));var Ih=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{prefixCls:t,className:n,avatar:i,title:o,description:r}=e,a=Ih(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:s}=Dh.useContext(j),c=s("card",t),u=l(`${c}-meta`,n),d=i?Dh.createElement("div",{className:`${c}-meta-avatar`},i):null,h=o?Dh.createElement("div",{className:`${c}-meta-title`},o):null,p=r?Dh.createElement("div",{className:`${c}-meta-description`},r):null,m=h||p?Dh.createElement("div",{className:`${c}-meta-detail`},h,p):null;return Dh.createElement("div",Object.assign({},a,{className:u}),d,m)};const Ph=Hh,zh=e=>{const{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},Fh=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:i,lineWidth:o,textPaddingInline:s,orientationMargin:l,verticalMarginInline:c}=e;return{[t]:Object.assign(Object.assign({},r(e)),{borderBlockStart:`${a(o)} solid ${i}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:c,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${a(o)} solid ${i}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${a(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${a(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${i}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${a(o)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-start`]:{"&::before":{width:`calc(${l} * 100%)`},"&::after":{width:`calc(100% - ${l} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{"&::before":{width:`calc(100% - ${l} * 100%)`},"&::after":{width:`calc(${l} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:s},"&-dashed":{background:"none",borderColor:i,borderStyle:"dashed",borderWidth:`${a(o)} 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:o,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:i,borderStyle:"dotted",borderWidth:`${a(o)} 0 0`},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:o,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}},Vh=o("Divider",(e=>{const t=R(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[Fh(t),zh(t)]}),(e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS})),{unitless:{orientationMargin:!0}});var Bh=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{getPrefixCls:t,direction:n,className:i,style:o}=s("divider"),{prefixCls:r,type:a="horizontal",orientation:c="center",orientationMargin:u,className:d,rootClassName:h,children:p,dashed:m,variant:f="solid",plain:g,style:y,size:v}=e,b=Bh(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),w=t("divider",r),[x,C,_]=Vh(w),S=De(v),k=Uh[S],E=!!p,$=Wh.useMemo((()=>"left"===c?"rtl"===n?"end":"start":"right"===c?"rtl"===n?"start":"end":c),[n,c]),M="start"===$&&null!=u,R="end"===$&&null!=u,A=l(w,i,C,_,`${w}-${a}`,{[`${w}-with-text`]:E,[`${w}-with-text-${$}`]:E,[`${w}-dashed`]:!!m,[`${w}-${f}`]:"solid"!==f,[`${w}-plain`]:!!g,[`${w}-rtl`]:"rtl"===n,[`${w}-no-default-orientation-margin-start`]:M,[`${w}-no-default-orientation-margin-end`]:R,[`${w}-${k}`]:!!k},d,h),O=Wh.useMemo((()=>"number"==typeof u?u:/^\d+$/.test(u)?Number(u):u),[u]),j={marginInlineStart:M?O:void 0,marginInlineEnd:R?O:void 0};return x(Wh.createElement("div",Object.assign({className:A,style:Object.assign(Object.assign({},o),y)},b,{role:"separator"}),p&&"vertical"!==a&&Wh.createElement("span",{className:`${w}-inner-text`,style:j},p)))},Zh=window.React;var Gh=function(e,t){if(!e)return null;var n={left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth,top:e.offsetTop,bottom:e.parentElement.clientHeight-e.clientHeight-e.offsetTop,height:e.clientHeight};return t?{left:0,right:0,width:0,top:n.top,bottom:n.bottom,height:n.height}:{left:n.left,right:n.right,width:n.width,top:0,bottom:0,height:0}},qh=function(e){return void 0!==e?"".concat(e,"px"):void 0};function Kh(e){var t=e.prefixCls,n=e.containerRef,i=e.value,o=e.getValueIndex,r=e.motionName,a=e.onMotionStart,s=e.onMotionEnd,d=e.direction,h=e.vertical,p=void 0!==h&&h,m=Zh.useRef(null),f=Zh.useState(i),g=x(f,2),y=g[0],v=g[1],b=function(e){var i,r=o(e),a=null===(i=n.current)||void 0===i?void 0:i.querySelectorAll(".".concat(t,"-item"))[r];return(null==a?void 0:a.offsetParent)&&a},w=Zh.useState(null),C=x(w,2),_=C[0],S=C[1],k=Zh.useState(null),$=x(k,2),M=$[0],R=$[1];_e((function(){if(y!==i){var e=b(y),t=b(i),n=Gh(e,p),o=Gh(t,p);v(i),S(n),R(o),e&&t?a():s()}}),[i]);var A=Zh.useMemo((function(){var e;return qh(p?null!==(e=null==_?void 0:_.top)&&void 0!==e?e:0:"rtl"===d?-(null==_?void 0:_.right):null==_?void 0:_.left)}),[p,d,_]),O=Zh.useMemo((function(){var e;return qh(p?null!==(e=null==M?void 0:M.top)&&void 0!==e?e:0:"rtl"===d?-(null==M?void 0:M.right):null==M?void 0:M.left)}),[p,d,M]);return _&&M?Zh.createElement(c,{visible:!0,motionName:r,motionAppear:!0,onAppearStart:function(){return p?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"}},onAppearActive:function(){return p?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"}},onVisibleChanged:function(){S(null),R(null),s()}},(function(e,n){var i=e.className,o=e.style,r=E(E({},o),{},{"--thumb-start-left":A,"--thumb-start-width":qh(null==_?void 0:_.width),"--thumb-active-left":O,"--thumb-active-width":qh(null==M?void 0:M.width),"--thumb-start-top":A,"--thumb-start-height":qh(null==_?void 0:_.height),"--thumb-active-top":O,"--thumb-active-height":qh(null==M?void 0:M.height)}),a={ref:u(m,n),style:r,className:l("".concat(t,"-thumb"),i)};return Zh.createElement("div",a)})):null}var Qh=["prefixCls","direction","vertical","options","disabled","defaultValue","value","name","onChange","className","motionName"];const Xh=window.React;var Jh=function(e){var t=e.prefixCls,n=e.className,i=e.disabled,o=e.checked,r=e.label,a=e.title,s=e.value,c=e.name,u=e.onChange,d=e.onFocus,h=e.onBlur,p=e.onKeyDown,m=e.onKeyUp,f=e.onMouseDown;return Xh.createElement("label",{className:l(n,_({},"".concat(t,"-item-disabled"),i)),onMouseDown:f},Xh.createElement("input",{name:c,className:"".concat(t,"-item-input"),type:"radio",disabled:i,checked:o,onChange:function(e){i||u(e,s)},onFocus:d,onBlur:h,onKeyDown:p,onKeyUp:m}),Xh.createElement("div",{className:"".concat(t,"-item-label"),title:a,"aria-selected":o},r))},ep=Xh.forwardRef((function(e,t){var n,o,r=e.prefixCls,a=void 0===r?"rc-segmented":r,s=e.direction,c=e.vertical,d=e.options,h=void 0===d?[]:d,p=e.disabled,m=e.defaultValue,f=e.value,g=e.name,y=e.onChange,v=e.className,b=void 0===v?"":v,w=e.motionName,S=void 0===w?"thumb-motion":w,$=k(e,Qh),M=Xh.useRef(null),R=Xh.useMemo((function(){return u(M,t)}),[M,t]),A=Xh.useMemo((function(){return function(e){return e.map((function(e){if("object"===C(e)&&null!==e){var t=function(e){return void 0!==e.title?e.title:"object"!==C(e.label)?null===(t=e.label)||void 0===t?void 0:t.toString():void 0;var t}(e);return E(E({},e),{},{title:t})}return{label:null==e?void 0:e.toString(),title:null==e?void 0:e.toString(),value:e}}))}(h)}),[h]),O=de(null===(n=A[0])||void 0===n?void 0:n.value,{value:f,defaultValue:m}),j=x(O,2),T=j[0],N=j[1],L=Xh.useState(!1),I=x(L,2),D=I[0],H=I[1],P=function(e,t){N(t),null==y||y(t)},z=W($,["children"]),F=Xh.useState(!1),V=x(F,2),B=V[0],U=V[1],Y=Xh.useState(!1),Z=x(Y,2),G=Z[0],q=Z[1],K=function(){q(!0)},Q=function(){q(!1)},X=function(){U(!1)},J=function(e){"Tab"===e.key&&U(!0)},ee=function(e){var t=A.findIndex((function(e){return e.value===T})),n=A.length,i=A[(t+e+n)%n];i&&(N(i.value),null==y||y(i.value))},te=function(e){switch(e.key){case"ArrowLeft":case"ArrowUp":ee(-1);break;case"ArrowRight":case"ArrowDown":ee(1)}};return Xh.createElement("div",i({role:"radiogroup","aria-label":"segmented control",tabIndex:p?void 0:0},z,{className:l(a,(o={},_(o,"".concat(a,"-rtl"),"rtl"===s),_(o,"".concat(a,"-disabled"),p),_(o,"".concat(a,"-vertical"),c),o),b),ref:R}),Xh.createElement("div",{className:"".concat(a,"-group")},Xh.createElement(Kh,{vertical:c,prefixCls:a,value:T,containerRef:M,motionName:"".concat(a,"-").concat(S),direction:s,getValueIndex:function(e){return A.findIndex((function(t){return t.value===e}))},onMotionStart:function(){H(!0)},onMotionEnd:function(){H(!1)}}),A.map((function(e){var t;return Xh.createElement(Jh,i({},e,{name:g,key:e.value,prefixCls:a,className:l(e.className,"".concat(a,"-item"),(t={},_(t,"".concat(a,"-item-selected"),e.value===T&&!D),_(t,"".concat(a,"-item-focused"),G&&B&&e.value===T),t)),checked:e.value===T,onChange:P,onFocus:K,onBlur:Q,onKeyDown:te,onKeyUp:J,onMouseDown:X,disabled:!!p||!!e.disabled}))}))))}));function tp(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}function np(e){return{backgroundColor:e.itemSelectedBg,boxShadow:e.boxShadowTertiary}}const ip=Object.assign({overflow:"hidden"},je),op=o("Segmented",(e=>{const{lineWidth:t,calc:n}=e;return(e=>{const{componentCls:t}=e,n=e.calc(e.controlHeight).sub(e.calc(e.trackPadding).mul(2)).equal(),i=e.calc(e.controlHeightLG).sub(e.calc(e.trackPadding).mul(2)).equal(),o=e.calc(e.controlHeightSM).sub(e.calc(e.trackPadding).mul(2)).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r(e)),{display:"inline-block",padding:e.trackPadding,color:e.itemColor,background:e.trackBg,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`}),q(e)),{[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-vertical`]:{[`${t}-group`]:{flexDirection:"column"},[`${t}-thumb`]:{width:"100%",height:0,padding:`0 ${a(e.paddingXXS)}`}},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${e.motionDurationMid} ${e.motionEaseInOut}`,borderRadius:e.borderRadiusSM,transform:"translateZ(0)","&-selected":Object.assign(Object.assign({},np(e)),{color:e.itemSelectedColor}),"&-focused":Ie(e),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",opacity:0,transition:`opacity ${e.motionDurationMid}`,pointerEvents:"none"},[`&:hover:not(${t}-item-selected):not(${t}-item-disabled)`]:{color:e.itemHoverColor,"&::after":{opacity:1,backgroundColor:e.itemHoverBg}},[`&:active:not(${t}-item-selected):not(${t}-item-disabled)`]:{color:e.itemHoverColor,"&::after":{opacity:1,backgroundColor:e.itemActiveBg}},"&-label":Object.assign({minHeight:n,lineHeight:a(n),padding:`0 ${a(e.segmentedPaddingHorizontal)}`},ip),"&-icon + *":{marginInlineStart:e.calc(e.marginSM).div(2).equal()},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:Object.assign(Object.assign({},np(e)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${a(e.paddingXXS)} 0`,borderRadius:e.borderRadiusSM,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, height ${e.motionDurationSlow} ${e.motionEaseInOut}`,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:i,lineHeight:a(i),padding:`0 ${a(e.segmentedPaddingHorizontal)}`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:o,lineHeight:a(o),padding:`0 ${a(e.segmentedPaddingHorizontalSM)}`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}}}),tp(`&-disabled ${t}-item`,e)),tp(`${t}-item-disabled`,e)),{[`${t}-thumb-motion-appear-active`]:{transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, width ${e.motionDurationSlow} ${e.motionEaseInOut}`,willChange:"transform, width"},[`&${t}-shape-round`]:{borderRadius:9999,[`${t}-item, ${t}-thumb`]:{borderRadius:9999}}})}})(R(e,{segmentedPaddingHorizontal:n(e.controlPaddingHorizontal).sub(t).equal(),segmentedPaddingHorizontalSM:n(e.controlPaddingHorizontalSM).sub(t).equal()}))}),(e=>{const{colorTextLabel:t,colorText:n,colorFillSecondary:i,colorBgElevated:o,colorFill:r,lineWidthBold:a,colorBgLayout:s}=e;return{trackPadding:a,trackBg:s,itemColor:t,itemHoverColor:n,itemHoverBg:i,itemSelectedBg:o,itemActiveBg:r,itemSelectedColor:n}}));var rp=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const n=H(),{prefixCls:i,className:o,rootClassName:r,block:a,options:c=[],size:u="middle",style:d,vertical:h,shape:p="default",name:m=n}=e,f=rp(e,["prefixCls","className","rootClassName","block","options","size","style","vertical","shape","name"]),{getPrefixCls:g,direction:y,className:v,style:b}=s("segmented"),w=g("segmented",i),[x,C,_]=op(w),S=De(u),k=ap.useMemo((()=>c.map((e=>{if(function(e){return"object"==typeof e&&!!(null==e?void 0:e.icon)}(e)){const{icon:t,label:n}=e,i=rp(e,["icon","label"]);return Object.assign(Object.assign({},i),{label:ap.createElement(ap.Fragment,null,ap.createElement("span",{className:`${w}-item-icon`},t),n&&ap.createElement("span",null,n))})}return e}))),[c,w]),E=l(o,r,v,{[`${w}-block`]:a,[`${w}-sm`]:"small"===S,[`${w}-lg`]:"large"===S,[`${w}-vertical`]:h,[`${w}-shape-${p}`]:"round"===p},C,_),$=Object.assign(Object.assign({},b),d);return x(ap.createElement(ep,Object.assign({},f,{name:m,className:E,style:$,options:k,ref:t,prefixCls:w,direction:y,vertical:h})))})),lp=window.React,cp=lp.createContext({}),up=lp.createContext({}),dp=window.React,hp=({prefixCls:e,value:t,onChange:n})=>dp.createElement("div",{className:`${e}-clear`,onClick:()=>{if(n&&t&&!t.cleared){const e=t.toHsb();e.a=0;const i=Pe(e);i.cleared=!0,n(i)}}}),pp="hex",mp="rgb",fp="hsb",gp={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},yp=window.React;var vp=function(e,t){return yp.createElement(n,i({},e,{ref:t,icon:gp}))};const bp=yp.forwardRef(vp);function wp(){return"function"==typeof BigInt}function xp(e){return!e&&0!==e&&!Number.isNaN(e)||!String(e).trim()}function Cp(e){var t=e.trim(),n=t.startsWith("-");n&&(t=t.slice(1)),(t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,"")).startsWith(".")&&(t="0".concat(t));var i=t||"0",o=i.split("."),r=o[0]||"0",a=o[1]||"0";"0"===r&&"0"===a&&(n=!1);var s=n?"-":"";return{negative:n,negativeStr:s,trimStr:i,integerStr:r,decimalStr:a,fullStr:"".concat(s).concat(i)}}function _p(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function Sp(e){var t=String(e);if(_p(e)){var n=Number(t.slice(t.indexOf("e-")+2)),i=t.match(/\.(\d+)/);return null!=i&&i[1]&&(n+=i[1].length),n}return t.includes(".")&&Ep(t)?t.length-t.indexOf(".")-1:0}function kp(e){var t=String(e);if(_p(e)){if(e>Number.MAX_SAFE_INTEGER)return String(wp()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e0&&void 0!==arguments[0]&&!arguments[0]?this.origin:this.isInvalidate()?"":Cp("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr}}]),e}(),Mp=function(){function e(t){w(this,e),_(this,"origin",""),_(this,"number",void 0),_(this,"empty",void 0),xp(t)?this.empty=!0:(this.origin=String(t),this.number=Number(t))}return b(e,[{key:"negate",value:function(){return new e(-this.toNumber())}},{key:"add",value:function(t){if(this.isInvalidate())return new e(t);var n=Number(t);if(Number.isNaN(n))return this;var i=this.number+n;if(i>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(iNumber.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(i0&&void 0!==arguments[0]&&!arguments[0]?this.origin:this.isInvalidate()?"":kp(this.number)}}]),e}();function Rp(e){return wp()?new $p(e):new Mp(e)}function Ap(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(""===e)return"";var o=Cp(e),r=o.negativeStr,a=o.integerStr,s=o.decimalStr,l="".concat(t).concat(s),c="".concat(r).concat(a);if(n>=0){var u=Number(s[n]);return u>=5&&!i?Ap(Rp(e).add("".concat(r,"0.").concat("0".repeat(n)).concat(10-u)).toString(),t,n,i):0===n?c:"".concat(c).concat(t).concat(s.padEnd(n,"0").slice(0,n))}return".0"===l?c:"".concat(c).concat(l)}const Op=window.React.useRef,jp=window.React.useState,Tp=window.React;function Np(e){var t=e.prefixCls,n=e.upNode,o=e.downNode,r=e.upDisabled,a=e.downDisabled,s=e.onStep,c=Tp.useRef(),u=Tp.useRef([]),d=Tp.useRef();d.current=s;var h,p,m,f,g=function(){clearTimeout(c.current)},y=function(e,t){e.preventDefault(),g(),d.current(t),c.current=setTimeout((function e(){d.current(t),c.current=setTimeout(e,200)}),600)};if(Tp.useEffect((function(){return function(){g(),u.current.forEach((function(e){return we.cancel(e)}))}}),[]),h=jp(!1),m=(p=x(h,2))[0],f=p[1],_e((function(){f(Le())}),[]),m)return null;var v="".concat(t,"-handler"),b=l(v,"".concat(v,"-up"),_({},"".concat(v,"-up-disabled"),r)),w=l(v,"".concat(v,"-down"),_({},"".concat(v,"-down-disabled"),a)),C=function(){return u.current.push(we(g))},S={unselectable:"on",role:"button",onMouseUp:C,onMouseLeave:C};return Tp.createElement("div",{className:"".concat(v,"-wrap")},Tp.createElement("span",i({},S,{onMouseDown:function(e){y(e,!0)},"aria-label":"Increase Value","aria-disabled":r,className:b}),n||Tp.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-up-inner")})),Tp.createElement("span",i({},S,{onMouseDown:function(e){y(e,!1)},"aria-label":"Decrease Value","aria-disabled":a,className:w}),o||Tp.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-down-inner")})))}function Lp(e){var t="number"==typeof e?kp(e):Cp(e).fullStr;return t.includes(".")?Cp(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}const Ip=window.React.useRef,Dp=window.React.useEffect;var Hp=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],Pp=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"];const zp=window.React;var Fp=function(e,t){return e||t.isEmpty()?t.toString():t.toNumber()},Vp=function(e){var t=Rp(e);return t.isInvalidate()?null:t},Bp=zp.forwardRef((function(e,t){var n=e.prefixCls,o=e.className,r=e.style,a=e.min,s=e.max,c=e.step,d=void 0===c?1:c,h=e.defaultValue,p=e.value,m=e.disabled,f=e.readOnly,g=e.upHandler,y=e.downHandler,v=e.keyboard,b=e.changeOnWheel,w=void 0!==b&&b,S=e.controls,E=void 0===S||S;e.classNames;var $=e.stringMode,M=e.parser,R=e.formatter,A=e.precision,O=e.decimalSeparator,j=e.onChange,T=e.onInput,N=e.onPressEnter,L=e.onStep,I=e.changeOnBlur,D=void 0===I||I,H=e.domRef,P=k(e,Hp),z="".concat(n,"-input"),F=zp.useRef(null),V=zp.useState(!1),B=x(V,2),W=B[0],U=B[1],Y=zp.useRef(!1),Z=zp.useRef(!1),G=zp.useRef(!1),q=zp.useState((function(){return Rp(null!=p?p:h)})),K=x(q,2),Q=K[0],X=K[1],J=zp.useCallback((function(e,t){if(!t)return A>=0?A:Math.max(Sp(e),Sp(d))}),[A,d]),ee=zp.useCallback((function(e){var t=String(e);if(M)return M(t);var n=t;return O&&(n=n.replace(O,".")),n.replace(/[^\w.-]+/g,"")}),[M,O]),te=zp.useRef(""),ne=zp.useCallback((function(e,t){if(R)return R(e,{userTyping:t,input:String(te.current)});var n="number"==typeof e?kp(e):e;if(!t){var i=J(n,t);Ep(n)&&(O||i>=0)&&(n=Ap(n,O||".",i))}return n}),[R,J,O]),ie=zp.useState((function(){var e=null!=h?h:p;return Q.isInvalidate()&&["string","number"].includes(C(e))?Number.isNaN(e)?"":e:ne(Q.toString(),!1)})),oe=x(ie,2),re=oe[0],ae=oe[1];function se(e,t){ae(ne(e.isInvalidate()?e.toString(!1):e.toString(!t),t))}te.current=re;var le,ce,ue,de,he,pe=zp.useMemo((function(){return Vp(s)}),[s,A]),me=zp.useMemo((function(){return Vp(a)}),[a,A]),fe=zp.useMemo((function(){return!(!pe||!Q||Q.isInvalidate())&&pe.lessEquals(Q)}),[pe,Q]),ge=zp.useMemo((function(){return!(!me||!Q||Q.isInvalidate())&&Q.lessEquals(me)}),[me,Q]),ye=(le=F.current,ce=W,ue=Op(null),[function(){try{var e=le.selectionStart,t=le.selectionEnd,n=le.value,i=n.substring(0,e),o=n.substring(t);ue.current={start:e,end:t,value:n,beforeTxt:i,afterTxt:o}}catch(r){}},function(){if(le&&ue.current&&ce)try{var e=le.value,t=ue.current,n=t.beforeTxt,i=t.afterTxt,o=t.start,r=e.length;if(e.startsWith(n))r=n.length;else if(e.endsWith(i))r=e.length-ue.current.afterTxt.length;else{var a=n[o-1],s=e.indexOf(a,o-1);-1!==s&&(r=s+1)}le.setSelectionRange(r,r)}catch(l){xe(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(l.message))}}]),ve=x(ye,2),be=ve[0],_e=ve[1],Se=function(e){return pe&&!e.lessEquals(pe)?pe:me&&!me.lessEquals(e)?me:null},ke=function(e){return!Se(e)},Ee=function(e,t){var n=e,i=ke(n)||n.isEmpty();if(n.isEmpty()||t||(n=Se(n)||n,i=!0),!f&&!m&&i){var o=n.toString(),r=J(o,t);return r>=0&&(n=Rp(Ap(o,".",r)),ke(n)||(n=Rp(Ap(o,".",r,!0)))),n.equals(Q)||(void 0===p&&X(n),null==j||j(n.isEmpty()?null:Fp($,n)),void 0===p&&se(n,t)),n}return Q},$e=(de=Ip(0),he=function(){we.cancel(de.current)},Dp((function(){return he}),[]),function(e){he(),de.current=we((function(){e()}))}),Me=function e(t){if(be(),te.current=t,ae(t),!Z.current){var n=Rp(ee(t));n.isNaN()||Ee(n,!0)}null==T||T(t),$e((function(){var n=t;M||(n=t.replace(/。/g,".")),n!==t&&e(n)}))},Re=function(e){var t;if(!(e&&fe||!e&&ge)){Y.current=!1;var n=Rp(G.current?Lp(d):d);e||(n=n.negate());var i=(Q||Rp(0)).add(n.toString()),o=Ee(i,!1);null==L||L(Fp($,o),{offset:G.current?Lp(d):d,type:e?"up":"down"}),null===(t=F.current)||void 0===t||t.focus()}},Ae=function(e){var t,n=Rp(ee(re));t=n.isNaN()?Ee(Q,e):Ee(n,e),void 0!==p?se(Q,!1):t.isNaN()||se(t,!1)};return zp.useEffect((function(){if(w&&W){var e=function(e){Re(e.deltaY<0),e.preventDefault()},t=F.current;if(t)return t.addEventListener("wheel",e,{passive:!1}),function(){return t.removeEventListener("wheel",e)}}})),Ce((function(){Q.isInvalidate()||se(Q,!1)}),[A,R]),Ce((function(){var e=Rp(p);X(e);var t=Rp(ee(re));e.equals(t)&&Y.current&&!R||se(e,Y.current)}),[p]),Ce((function(){R&&_e()}),[re]),zp.createElement("div",{ref:H,className:l(n,o,_(_(_(_(_({},"".concat(n,"-focused"),W),"".concat(n,"-disabled"),m),"".concat(n,"-readonly"),f),"".concat(n,"-not-a-number"),Q.isNaN()),"".concat(n,"-out-of-range"),!Q.isInvalidate()&&!ke(Q))),style:r,onFocus:function(){U(!0)},onBlur:function(){D&&Ae(!1),U(!1),Y.current=!1},onKeyDown:function(e){var t=e.key,n=e.shiftKey;Y.current=!0,G.current=n,"Enter"===t&&(Z.current||(Y.current=!1),Ae(!1),null==N||N(e)),!1!==v&&!Z.current&&["Up","ArrowUp","Down","ArrowDown"].includes(t)&&(Re("Up"===t||"ArrowUp"===t),e.preventDefault())},onKeyUp:function(){Y.current=!1,G.current=!1},onCompositionStart:function(){Z.current=!0},onCompositionEnd:function(){Z.current=!1,Me(F.current.value)},onBeforeInput:function(){Y.current=!0}},E&&zp.createElement(Np,{prefixCls:n,upNode:g,downNode:y,upDisabled:fe,downDisabled:ge,onStep:Re}),zp.createElement("div",{className:"".concat(z,"-wrap")},zp.createElement("input",i({autoComplete:"off",role:"spinbutton","aria-valuemin":a,"aria-valuemax":s,"aria-valuenow":Q.isInvalidate()?null:Q.toString(),step:d},P,{ref:u(F,t),className:z,value:re,onChange:function(e){Me(e.target.value)},disabled:m,readOnly:f}))))})),Wp=zp.forwardRef((function(e,t){var n=e.disabled,o=e.style,r=e.prefixCls,a=void 0===r?"rc-input-number":r,s=e.value,l=e.prefix,c=e.suffix,u=e.addonBefore,d=e.addonAfter,h=e.className,p=e.classNames,m=k(e,Pp),f=zp.useRef(null),g=zp.useRef(null),y=zp.useRef(null),v=function(e){y.current&&Bt(y.current,e)};return zp.useImperativeHandle(t,(function(){return e=y.current,t={focus:v,nativeElement:f.current.nativeElement||g.current},"undefined"!=typeof Proxy&&e?new Proxy(e,{get:function(e,n){if(t[n])return t[n];var i=e[n];return"function"==typeof i?i.bind(e):i}}):e;var e,t})),zp.createElement(Vt,{className:h,triggerFocus:v,prefixCls:a,value:s,disabled:n,style:o,prefix:l,suffix:c,addonAfter:d,addonBefore:u,classNames:p,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:f},zp.createElement(Bp,i({prefixCls:a,disabled:n,ref:y,domRef:g,className:null==p?void 0:p.input},m)))}));const Up=({componentCls:e,borderRadiusSM:t,borderRadiusLG:n},i)=>{const o="lg"===i?n:t;return{[`&-${i}`]:{[`${e}-handler-wrap`]:{borderStartEndRadius:o,borderEndEndRadius:o},[`${e}-handler-up`]:{borderStartEndRadius:o},[`${e}-handler-down`]:{borderEndEndRadius:o}}}},Yp=e=>{const{componentCls:t,lineWidth:n,lineType:i,borderRadius:o,inputFontSizeSM:s,inputFontSizeLG:l,controlHeightLG:c,controlHeightSM:u,colorError:d,paddingInlineSM:h,paddingBlockSM:p,paddingBlockLG:m,paddingInlineLG:f,colorIcon:g,motionDurationMid:y,handleHoverColor:v,handleOpacity:b,paddingInline:w,paddingBlock:x,handleBg:C,handleActiveBg:_,colorTextDisabled:S,borderRadiusSM:k,borderRadiusLG:E,controlWidth:$,handleBorderColor:M,filledHandleBg:R,lineHeightLG:A,calc:O}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r(e)),Wt(e)),{display:"inline-block",width:$,margin:0,padding:0,borderRadius:o}),Ot(e,{[`${t}-handler-wrap`]:{background:C,[`${t}-handler-down`]:{borderBlockStart:`${a(n)} ${i} ${M}`}}})),Tt(e,{[`${t}-handler-wrap`]:{background:R,[`${t}-handler-down`]:{borderBlockStart:`${a(n)} ${i} ${M}`}},"&:focus-within":{[`${t}-handler-wrap`]:{background:C}}})),jt(e,{[`${t}-handler-wrap`]:{background:C,[`${t}-handler-down`]:{borderBlockStart:`${a(n)} ${i} ${M}`}}})),Nt(e)),{"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:l,lineHeight:A,borderRadius:E,[`input${t}-input`]:{height:O(c).sub(O(n).mul(2)).equal(),padding:`${a(m)} ${a(f)}`}},"&-sm":{padding:0,fontSize:s,borderRadius:k,[`input${t}-input`]:{height:O(u).sub(O(n).mul(2)).equal(),padding:`${a(p)} ${a(h)}`}},"&-out-of-range":{[`${t}-input-wrap`]:{input:{color:d}}},"&-group":Object.assign(Object.assign(Object.assign({},r(e)),Ut(e)),{"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",textAlign:"start",verticalAlign:"top",[`${t}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${t}-group-addon`]:{borderRadius:E,fontSize:e.fontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:k}}},Yt(e)),Zt(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})}),[`&-disabled ${t}-input`]:{cursor:"not-allowed"},[t]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},r(e)),{width:"100%",padding:`${a(x)} ${a(w)}`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:o,outline:0,transition:`all ${y} linear`,appearance:"textfield",fontSize:"inherit"}),Dt(e.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:"none"}})},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1}})},{[t]:Object.assign(Object.assign(Object.assign({[`${t}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleVisibleWidth,opacity:b,height:"100%",borderStartStartRadius:0,borderStartEndRadius:o,borderEndEndRadius:o,borderEndStartRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${y}`,overflow:"hidden",[`${t}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`\n ${t}-handler-up-inner,\n ${t}-handler-down-inner\n `]:{marginInlineEnd:0,fontSize:e.handleFontSize}}},[`${t}-handler`]:{height:"50%",overflow:"hidden",color:g,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${a(n)} ${i} ${M}`,transition:`all ${y} linear`,"&:active":{background:_},"&:hover":{height:"60%",[`\n ${t}-handler-up-inner,\n ${t}-handler-down-inner\n `]:{color:v}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},ze()),{color:g,transition:`all ${y} linear`,userSelect:"none"})},[`${t}-handler-up`]:{borderStartEndRadius:o},[`${t}-handler-down`]:{borderEndEndRadius:o}},Up(e,"lg")),Up(e,"sm")),{"&-disabled, &-readonly":{[`${t}-handler-wrap`]:{display:"none"},[`${t}-input`]:{color:"inherit"}},[`\n ${t}-handler-up-disabled,\n ${t}-handler-down-disabled\n `]:{cursor:"not-allowed"},[`\n ${t}-handler-up-disabled:hover &-handler-up-inner,\n ${t}-handler-down-disabled:hover &-handler-down-inner\n `]:{color:S}})}]},Zp=e=>{const{componentCls:t,paddingBlock:n,paddingInline:i,inputAffixPadding:o,controlWidth:r,borderRadiusLG:s,borderRadiusSM:l,paddingInlineLG:c,paddingInlineSM:u,paddingBlockLG:d,paddingBlockSM:h,motionDurationMid:p}=e;return{[`${t}-affix-wrapper`]:Object.assign(Object.assign({[`input${t}-input`]:{padding:`${a(n)} 0`}},Wt(e)),{position:"relative",display:"inline-flex",alignItems:"center",width:r,padding:0,paddingInlineStart:i,"&-lg":{borderRadius:s,paddingInlineStart:c,[`input${t}-input`]:{padding:`${a(d)} 0`}},"&-sm":{borderRadius:l,paddingInlineStart:u,[`input${t}-input`]:{padding:`${a(h)} 0`}},[`&:not(${t}-disabled):hover`]:{zIndex:1},"&-focused, &:focus":{zIndex:1},[`&-disabled > ${t}-disabled`]:{background:"transparent"},[`> div${t}`]:{width:"100%",border:"none",outline:"none",[`&${t}-focused`]:{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${t}-handler-wrap`]:{zIndex:2},[t]:{position:"static",color:"inherit","&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:o},"&-suffix":{insetBlockStart:0,insetInlineEnd:0,height:"100%",marginInlineEnd:i,marginInlineStart:o,transition:`margin ${p}`}},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1},[`&:not(${t}-affix-wrapper-without-controls):hover ${t}-suffix`]:{marginInlineEnd:e.calc(e.handleWidth).add(i).equal()}}),[`${t}-underlined`]:{borderRadius:0}}},Gp=o("InputNumber",(e=>{const t=R(e,Lt(e));return[Yp(t),Zp(t),It(t)]}),(e=>{var t;const n=null!==(t=e.handleVisible)&&void 0!==t?t:"auto",i=e.controlHeightSM-2*e.lineWidth;return Object.assign(Object.assign({},At(e)),{controlWidth:90,handleWidth:i,handleFontSize:e.fontSize/2,handleVisible:n,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new Ee(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:!0===n?1:0,handleVisibleWidth:!0===n?i:0})}),{unitless:{handleOpacity:!0},resetFont:!1});var qp=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{getPrefixCls:n,direction:i}=Kp.useContext(j),o=Kp.useRef(null);Kp.useImperativeHandle(t,(()=>o.current));const{className:r,rootClassName:a,size:s,disabled:c,prefixCls:u,addonBefore:d,addonAfter:h,prefix:p,suffix:m,bordered:f,readOnly:g,status:y,controls:v,variant:b}=e,w=qp(e,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","suffix","bordered","readOnly","status","controls","variant"]),x=n("input-number",u),C=T(x),[_,S,k]=Gp(x,C),{compactSize:E,compactItemClassnames:$}=Fe(x,i);let M=Kp.createElement(bp,{className:`${x}-handler-up-inner`}),R=Kp.createElement($t,{className:`${x}-handler-down-inner`});const A="boolean"==typeof v?v:void 0;"object"==typeof v&&(M=void 0===v.upIcon?M:Kp.createElement("span",{className:`${x}-handler-up-inner`},v.upIcon),R=void 0===v.downIcon?R:Kp.createElement("span",{className:`${x}-handler-down-inner`},v.downIcon));const{hasFeedback:O,status:N,isFormItemInput:L,feedbackIcon:I}=Kp.useContext(Ve),D=qt(N,y),H=De((e=>{var t;return null!==(t=null!=s?s:E)&&void 0!==t?t:e})),P=Kp.useContext(Be),z=null!=c?c:P,[F,V]=He("inputNumber",b,f),B=O&&Kp.createElement(Kp.Fragment,null,I),W=l({[`${x}-lg`]:"large"===H,[`${x}-sm`]:"small"===H,[`${x}-rtl`]:"rtl"===i,[`${x}-in-form-item`]:L},S),U=`${x}-group`;return _(Kp.createElement(Wp,Object.assign({ref:o,disabled:z,className:l(k,C,r,a,$),upHandler:M,downHandler:R,prefixCls:x,readOnly:g,controls:A,prefix:p,suffix:B||m,addonBefore:d&&Kp.createElement(X,{form:!0,space:!0},d),addonAfter:h&&Kp.createElement(X,{form:!0,space:!0},h),classNames:{input:W,variant:l({[`${x}-${F}`]:V},Gt(x,D,O)),affixWrapper:l({[`${x}-affix-wrapper-sm`]:"small"===H,[`${x}-affix-wrapper-lg`]:"large"===H,[`${x}-affix-wrapper-rtl`]:"rtl"===i,[`${x}-affix-wrapper-without-controls`]:!1===v||z||g},S),wrapper:l({[`${U}-rtl`]:"rtl"===i},S),groupWrapper:l({[`${x}-group-wrapper-sm`]:"small"===H,[`${x}-group-wrapper-lg`]:"large"===H,[`${x}-group-wrapper-rtl`]:"rtl"===i,[`${x}-group-wrapper-${F}`]:V},Gt(`${x}-group-wrapper`,D,O),S)}},w)))})),Xp=Qp;Xp._InternalPanelDoNotUseOrYouWillBeFired=e=>Kp.createElement(ie,{theme:{components:{InputNumber:{handleVisible:!0}}}},Kp.createElement(Qp,Object.assign({},e)));const Jp=Xp,em=window.React,tm=window.React.useState,nm=({prefixCls:e,min:t=0,max:n=100,value:i,onChange:o,className:r,formatter:a})=>{const s=`${e}-steppers`,[c,u]=tm(0),d=Number.isNaN(i)?c:i;return em.createElement(Jp,{className:l(s,r),min:t,max:n,value:d,formatter:a,size:"small",onChange:e=>{u(e||0),null==o||o(e)}})},im=window.React,om=window.React.useState,rm=({prefixCls:e,value:t,onChange:n})=>{const i=`${e}-alpha-input`,[o,r]=om((()=>Pe(t||"#000"))),a=t||o;return im.createElement(nm,{value:We(a),prefixCls:e,formatter:e=>`${e}%`,className:i,onChange:e=>{const t=a.toHsb();t.a=(e||0)/100;const i=Pe(t);r(i),null==n||n(i)}})},am=window.React,sm=window.React.useEffect,lm=window.React.useState,cm=/(^#[\da-f]{6}$)|(^#[\da-f]{8}$)/i,um=({prefixCls:e,value:t,onChange:n})=>{const i=`${e}-hex-input`,[o,r]=lm((()=>t?Ue(t.toHexString()):void 0));return sm((()=>{t&&r(Ue(t.toHexString()))}),[t]),am.createElement(Kt,{className:i,value:o,prefix:"#",onChange:e=>{const t=e.target.value;var i;r(Ue(t)),i=Ue(t,!0),cm.test(`#${i}`)&&(null==n||n(Pe(t)))},size:"small"})},dm=window.React,hm=window.React.useState,pm=({prefixCls:e,value:t,onChange:n})=>{const i=`${e}-hsb-input`,[o,r]=hm((()=>Pe(t||"#000"))),a=t||o,s=(e,t)=>{const i=a.toHsb();i[t]="h"===t?e:(e||0)/100;const o=Pe(i);r(o),null==n||n(o)};return dm.createElement("div",{className:i},dm.createElement(nm,{max:360,min:0,value:Number(a.toHsb().h),prefixCls:e,className:i,formatter:e=>Ye(e||0).toString(),onChange:e=>s(Number(e),"h")}),dm.createElement(nm,{max:100,min:0,value:100*Number(a.toHsb().s),prefixCls:e,className:i,formatter:e=>`${Ye(e||0)}%`,onChange:e=>s(Number(e),"s")}),dm.createElement(nm,{max:100,min:0,value:100*Number(a.toHsb().b),prefixCls:e,className:i,formatter:e=>`${Ye(e||0)}%`,onChange:e=>s(Number(e),"b")}))},mm=window.React,fm=window.React.useState,gm=({prefixCls:e,value:t,onChange:n})=>{const i=`${e}-rgb-input`,[o,r]=fm((()=>Pe(t||"#000"))),a=t||o,s=(e,t)=>{const i=a.toRgb();i[t]=e||0;const o=Pe(i);r(o),null==n||n(o)};return mm.createElement("div",{className:i},mm.createElement(nm,{max:255,min:0,value:Number(a.toRgb().r),prefixCls:e,className:i,onChange:e=>s(Number(e),"r")}),mm.createElement(nm,{max:255,min:0,value:Number(a.toRgb().g),prefixCls:e,className:i,onChange:e=>s(Number(e),"g")}),mm.createElement(nm,{max:255,min:0,value:Number(a.toRgb().b),prefixCls:e,className:i,onChange:e=>s(Number(e),"b")}))},ym=window.React,vm=window.React.useMemo,bm=[pp,fp,mp].map((e=>({value:e,label:e.toUpperCase()}))),wm=e=>{const{prefixCls:t,format:n,value:i,disabledAlpha:o,onFormatChange:r,onChange:a,disabledFormat:s}=e,[l,c]=de(pp,{value:n,onChange:r}),u=`${t}-input`,d=vm((()=>{const e={value:i,prefixCls:t,onChange:a};switch(l){case fp:return ym.createElement(pm,Object.assign({},e));case mp:return ym.createElement(gm,Object.assign({},e));default:return ym.createElement(um,Object.assign({},e))}}),[l,t,i,a]);return ym.createElement("div",{className:`${u}-container`},!s&&ym.createElement(Qt,{value:l,variant:"borderless",getPopupContainer:e=>e,popupMatchSelectWidth:68,placement:"bottomRight",onChange:e=>{c(e)},className:`${t}-format-select`,size:"small",options:bm}),ym.createElement("div",{className:u},d),!o&&ym.createElement(rm,{prefixCls:t,value:i,onChange:a}))};function xm(e,t,n){return(e-t)/(n-t)}function Cm(e,t,n,i){var o=xm(t,n,i),r={};switch(e){case"rtl":r.right="".concat(100*o,"%"),r.transform="translateX(50%)";break;case"btt":r.bottom="".concat(100*o,"%"),r.transform="translateY(50%)";break;case"ttb":r.top="".concat(100*o,"%"),r.transform="translateY(-50%)";break;default:r.left="".concat(100*o,"%"),r.transform="translateX(-50%)"}return r}function _m(e,t){return Array.isArray(e)?e[t]:e}const Sm=window.React;var km=Sm.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),Em=Sm.createContext({}),$m=["prefixCls","value","valueIndex","onStartMove","onDelete","style","render","dragging","draggingDelete","onOffsetChange","onChangeComplete","onFocus","onMouseEnter"];const Mm=window.React;var Rm=Mm.forwardRef((function(e,t){var n,o=e.prefixCls,r=e.value,a=e.valueIndex,s=e.onStartMove,c=e.onDelete,u=e.style,d=e.render,h=e.dragging,p=e.draggingDelete,m=e.onOffsetChange,f=e.onChangeComplete,g=e.onFocus,y=e.onMouseEnter,v=k(e,$m),b=Mm.useContext(km),w=b.min,x=b.max,C=b.direction,S=b.disabled,$=b.keyboard,M=b.range,R=b.tabIndex,A=b.ariaLabelForHandle,O=b.ariaLabelledByForHandle,j=b.ariaRequired,T=b.ariaValueTextFormatterForHandle,N=b.styles,L=b.classNames,I="".concat(o,"-handle"),D=function(e){S||s(e,a)},H=Cm(C,r,w,x),P={};null!==a&&(P={tabIndex:S?null:_m(R,a),role:"slider","aria-valuemin":w,"aria-valuemax":x,"aria-valuenow":r,"aria-disabled":S,"aria-label":_m(A,a),"aria-labelledby":_m(O,a),"aria-required":_m(j,a),"aria-valuetext":null===(n=_m(T,a))||void 0===n?void 0:n(r),"aria-orientation":"ltr"===C||"rtl"===C?"horizontal":"vertical",onMouseDown:D,onTouchStart:D,onFocus:function(e){null==g||g(e,a)},onMouseEnter:function(e){y(e,a)},onKeyDown:function(e){if(!S&&$){var t=null;switch(e.which||e.keyCode){case xt.LEFT:t="ltr"===C||"btt"===C?-1:1;break;case xt.RIGHT:t="ltr"===C||"btt"===C?1:-1;break;case xt.UP:t="ttb"!==C?1:-1;break;case xt.DOWN:t="ttb"!==C?-1:1;break;case xt.HOME:t="min";break;case xt.END:t="max";break;case xt.PAGE_UP:t=2;break;case xt.PAGE_DOWN:t=-2;break;case xt.BACKSPACE:case xt.DELETE:null==c||c(a)}null!==t&&(e.preventDefault(),m(t,a))}},onKeyUp:function(e){switch(e.which||e.keyCode){case xt.LEFT:case xt.RIGHT:case xt.UP:case xt.DOWN:case xt.HOME:case xt.END:case xt.PAGE_UP:case xt.PAGE_DOWN:null==f||f()}}});var z=Mm.createElement("div",i({ref:t,className:l(I,_(_(_({},"".concat(I,"-").concat(a+1),null!==a&&M),"".concat(I,"-dragging"),h),"".concat(I,"-dragging-delete"),p),L.handle),style:E(E(E({},H),u),N.handle)},P,v));return d&&(z=d(z,{index:a,prefixCls:o,value:r,dragging:h,draggingDelete:p})),z})),Am=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","activeHandleRender","draggingIndex","draggingDelete","onFocus"];const Om=window.React,jm=window.ReactDOM.flushSync;var Tm=Om.forwardRef((function(e,t){var n=e.prefixCls,o=e.style,r=e.onStartMove,a=e.onOffsetChange,s=e.values,l=e.handleRender,c=e.activeHandleRender,u=e.draggingIndex,d=e.draggingDelete,h=e.onFocus,p=k(e,Am),m=Om.useRef({}),f=Om.useState(!1),g=x(f,2),y=g[0],v=g[1],b=Om.useState(-1),w=x(b,2),C=w[0],_=w[1],S=function(e){_(e),v(!0)};Om.useImperativeHandle(t,(function(){return{focus:function(e){var t;null===(t=m.current[e])||void 0===t||t.focus()},hideHelp:function(){jm((function(){v(!1)}))}}}));var $=E({prefixCls:n,onStartMove:r,onOffsetChange:a,render:l,onFocus:function(e,t){S(t),null==h||h(e)},onMouseEnter:function(e,t){S(t)}},p);return Om.createElement(Om.Fragment,null,s.map((function(e,t){var n=u===t;return Om.createElement(Rm,i({ref:function(e){e?m.current[t]=e:delete m.current[t]},dragging:n,draggingDelete:n&&d,style:_m(o,t),key:t,value:e,valueIndex:t},$))})),c&&y&&Om.createElement(Rm,i({key:"a11y"},$,{value:s[C],valueIndex:null,dragging:-1!==u,draggingDelete:d,render:c,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":!0})))}));const Nm=window.React;var Lm=function(e){var t=e.prefixCls,n=e.style,i=e.children,o=e.value,r=e.onClick,a=Nm.useContext(km),s=a.min,c=a.max,u=a.direction,d=a.includedStart,h=a.includedEnd,p=a.included,m="".concat(t,"-text"),f=Cm(u,o,s,c);return Nm.createElement("span",{className:l(m,_({},"".concat(m,"-active"),p&&d<=o&&o<=h)),style:E(E({},f),n),onMouseDown:function(e){e.stopPropagation()},onClick:function(){r(o)}},i)};const Im=window.React;var Dm=function(e){var t=e.prefixCls,n=e.marks,i=e.onClick,o="".concat(t,"-mark");return n.length?Im.createElement("div",{className:o},n.map((function(e){var t=e.value,n=e.style,r=e.label;return Im.createElement(Lm,{key:t,prefixCls:o,style:n,value:t,onClick:i},r)}))):null};const Hm=window.React;var Pm=function(e){var t=e.prefixCls,n=e.value,i=e.style,o=e.activeStyle,r=Hm.useContext(km),a=r.min,s=r.max,c=r.direction,u=r.included,d=r.includedStart,h=r.includedEnd,p="".concat(t,"-dot"),m=u&&d<=n&&n<=h,f=E(E({},Cm(c,n,a,s)),"function"==typeof i?i(n):i);return m&&(f=E(E({},f),"function"==typeof o?o(n):o)),Hm.createElement("span",{className:l(p,_({},"".concat(p,"-active"),m)),style:f})};const zm=window.React;var Fm=function(e){var t=e.prefixCls,n=e.marks,i=e.dots,o=e.style,r=e.activeStyle,a=zm.useContext(km),s=a.min,l=a.max,c=a.step,u=zm.useMemo((function(){var e=new Set;if(n.forEach((function(t){e.add(t.value)})),i&&null!==c)for(var t=s;t<=l;)e.add(t),t+=c;return Array.from(e)}),[s,l,c,i,n]);return zm.createElement("div",{className:"".concat(t,"-step")},u.map((function(e){return zm.createElement(Pm,{prefixCls:t,key:e,value:e,style:o,activeStyle:r})})))};const Vm=window.React;var Bm=function(e){var t=e.prefixCls,n=e.style,i=e.start,o=e.end,r=e.index,a=e.onStartMove,s=e.replaceCls,c=Vm.useContext(km),u=c.direction,d=c.min,h=c.max,p=c.disabled,m=c.range,f=c.classNames,g="".concat(t,"-track"),y=xm(i,d,h),v=xm(o,d,h),b=function(e){!p&&a&&a(e,-1)},w={};switch(u){case"rtl":w.right="".concat(100*y,"%"),w.width="".concat(100*v-100*y,"%");break;case"btt":w.bottom="".concat(100*y,"%"),w.height="".concat(100*v-100*y,"%");break;case"ttb":w.top="".concat(100*y,"%"),w.height="".concat(100*v-100*y,"%");break;default:w.left="".concat(100*y,"%"),w.width="".concat(100*v-100*y,"%")}var x=s||l(g,_(_({},"".concat(g,"-").concat(r+1),null!==r&&m),"".concat(t,"-track-draggable"),a),f.track);return Vm.createElement("div",{className:x,style:E(E({},w),n),onMouseDown:b,onTouchStart:b})};const Wm=window.React;var Um=function(e){var t=e.prefixCls,n=e.style,i=e.values,o=e.startPoint,r=e.onStartMove,a=Wm.useContext(km),s=a.included,c=a.range,u=a.min,d=a.styles,h=a.classNames,p=Wm.useMemo((function(){if(!c){if(0===i.length)return[];var e=null!=o?o:u,t=i[0];return[{start:Math.min(e,t),end:Math.max(e,t)}]}for(var n=[],r=0;r=0&&z}),[z,Ce]),ke=Km.useMemo((function(){return Object.keys(Q||{}).map((function(e){var t=Q[e],n={value:Number(e)};return t&&"object"===C(t)&&!Km.isValidElement(t)&&("label"in t||"style"in t)?(n.style=t.style,n.label=t.label):n.label=t,n})).filter((function(e){var t=e.label;return t||"number"==typeof t})).sort((function(e,t){return e.value-t.value}))}),[Q]),Ee=function(e,t,n,i,o,r){var a=Gm.useCallback((function(n){return Math.max(e,Math.min(t,n))}),[e,t]),s=Gm.useCallback((function(i){if(null!==n){var o=e+Math.round((a(i)-e)/n)*n,r=function(e){return(String(e).split(".")[1]||"").length},s=Math.max(r(n),r(t),r(e)),l=Number(o.toFixed(s));return e<=l&&l<=t?l:null}return null}),[n,e,t,a]),l=Gm.useCallback((function(o){var r=a(o),l=i.map((function(e){return e.value}));null!==n&&l.push(s(o)),l.push(e,t);var c=l[0],u=t-e;return l.forEach((function(e){var t=Math.abs(r-e);t<=u&&(c=e,u=t)})),c}),[e,t,i,n,a,s]),c=function o(r,a,l){var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit";if("number"==typeof a){var u,d=r[l],h=d+a,p=[];i.forEach((function(e){p.push(e.value)})),p.push(e,t),p.push(s(d));var m=a>0?1:-1;"unit"===c?p.push(s(d+m*n)):p.push(s(h)),p=p.filter((function(e){return null!==e})).filter((function(e){return a<0?e<=d:e>=d})),"unit"===c&&(p=p.filter((function(e){return e!==d})));var f="unit"===c?d:h;u=p[0];var g=Math.abs(u-f);if(p.forEach((function(e){var t=Math.abs(e-f);t1){var y=$(r);return y[l]=u,o(y,a-m,l,c)}return u}return"min"===a?e:"max"===a?t:void 0},u=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",o=e[n],r=c(e,t,n,i);return{value:r,changed:r!==o}},d=function(e){return null===r&&0===e||"number"==typeof r&&e3&&void 0!==arguments[3]?arguments[3]:"unit",a=e.map(l),s=a[n],h=c(a,t,n,i);if(a[n]=h,!1===o){var p=r||0;n>0&&a[n-1]!==s&&(a[n]=Math.max(a[n],a[n-1]+p)),n0;y-=1)for(var v=!0;d(a[y]-a[y-1])&&v;){var b=u(a,-1,y-1);a[y-1]=b.value,v=b.changed}for(var w=a.length-1;w>0;w-=1)for(var x=!0;d(a[w]-a[w-1])&&x;){var C=u(a,-1,w-1);a[w-1]=C.value,x=C.changed}for(var _=0;_=0?j+1:2;for(n=n.slice(0,i);n.length130&&u=0&&le.current.focus(e)}Ke(null)}),[qe]);var Qe=Km.useMemo((function(){return(!ge||null!==Ce)&&ge}),[ge,Ce]),Xe=M((function(e,t){We(e,t),null==N||N(Le(Ne))})),Je=-1!==ze;Km.useEffect((function(){if(!Je){var e=Ne.lastIndexOf(Fe);le.current.focus(e)}}),[Je]);var et=Km.useMemo((function(){return $(Be).sort((function(e,t){return e-t}))}),[Be]),tt=Km.useMemo((function(){return me?[et[0],et[et.length-1]]:[be,et[0]]}),[et,me,be]),nt=x(tt,2),it=nt[0],ot=nt[1];Km.useImperativeHandle(t,(function(){return{focus:function(){le.current.focus(0)},blur:function(){var e,t=document.activeElement;null!==(e=ce.current)&&void 0!==e&&e.contains(t)&&(null==t||t.blur())}}})),Km.useEffect((function(){m&&le.current.focus(0)}),[]);var rt=Km.useMemo((function(){return{min:be,max:we,direction:ue,disabled:d,keyboard:p,step:Ce,included:W,includedStart:it,includedEnd:ot,range:me,tabIndex:ie,ariaLabelForHandle:oe,ariaLabelledByForHandle:re,ariaRequired:ae,ariaValueTextFormatterForHandle:se,styles:s||{},classNames:a||{}}}),[be,we,ue,d,p,Ce,W,it,ot,me,ie,oe,re,ae,se,s,a]);return Km.createElement(km.Provider,{value:rt},Km.createElement("div",{ref:ce,className:l(i,o,_(_(_(_({},"".concat(i,"-disabled"),d),"".concat(i,"-vertical"),V),"".concat(i,"-horizontal"),!V),"".concat(i,"-with-marks"),ke.length)),style:r,onMouseDown:function(e){e.preventDefault();var t,n=ce.current.getBoundingClientRect(),i=n.width,o=n.height,r=n.left,a=n.top,s=n.bottom,l=n.right,c=e.clientX,u=e.clientY;switch(ue){case"btt":t=(s-u)/o;break;case"ttb":t=(u-a)/o;break;case"rtl":t=(l-c)/i;break;default:t=(c-r)/i}Ue(Me(be+t*(we-be)),e)},id:c},Km.createElement("div",{className:l("".concat(i,"-rail"),null==a?void 0:a.rail),style:E(E({},G),null==s?void 0:s.rail)}),!1!==te&&Km.createElement(Um,{prefixCls:i,style:Y,values:Ne,startPoint:U,onStartMove:Qe?Xe:void 0}),Km.createElement(Fm,{prefixCls:i,marks:ke,dots:X,style:q,activeStyle:K}),Km.createElement(Tm,{ref:le,prefixCls:i,style:Z,values:Be,draggingIndex:ze,draggingDelete:Ve,onStartMove:Xe,onOffsetChange:function(e,t){if(!d){var n=Re(Ne,e,t);null==N||N(Le(Ne)),Ie(n.values),Ke(n.value)}},onFocus:f,onBlur:g,handleRender:J,activeHandleRender:ee,onChangeComplete:De,onDelete:fe?function(e){if(!(d||!fe||Ne.length<=ye)){var t=$(Ne);t.splice(e,1),null==N||N(Le(t)),Ie(t);var n=Math.max(0,e-1);le.current.hideHelp(),le.current.focus(n)}}:void 0}),Km.createElement(Dm,{prefixCls:i,marks:ke,onClick:Ue})))}));const Xm=(0,window.React.createContext)({}),Jm=window.React,ef=window.React.useRef,tf=Jm.forwardRef(((e,t)=>{const{open:n,draggingDelete:i,value:o}=e,r=ef(null),a=n&&!i,s=ef(null);function l(){we.cancel(s.current),s.current=null}return Jm.useEffect((()=>(a?s.current=we((()=>{var e;null===(e=r.current)||void 0===e||e.forceAlign(),s.current=null})):l(),l)),[a,e.title,o]),Jm.createElement(he,Object.assign({ref:u(r,t)},e,{open:a}))})),nf=e=>{const{componentCls:t,antCls:n,controlSize:i,dotSize:o,marginFull:s,marginPart:l,colorFillContentHover:c,handleColorDisabled:u,calc:d,handleSize:h,handleSizeHover:p,handleActiveColor:m,handleActiveOutlineColor:f,handleLineWidth:g,handleLineWidthHover:y,motionDurationMid:v}=e;return{[t]:Object.assign(Object.assign({},r(e)),{position:"relative",height:i,margin:`${a(l)} ${a(s)}`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${a(s)} ${a(l)}`},[`${t}-rail`]:{position:"absolute",backgroundColor:e.railBg,borderRadius:e.borderRadiusXS,transition:`background-color ${v}`},[`${t}-track,${t}-tracks`]:{position:"absolute",transition:`background-color ${v}`},[`${t}-track`]:{backgroundColor:e.trackBg,borderRadius:e.borderRadiusXS},[`${t}-track-draggable`]:{boxSizing:"content-box",backgroundClip:"content-box",border:"solid rgba(0,0,0,0)"},"&:hover":{[`${t}-rail`]:{backgroundColor:e.railHoverBg},[`${t}-track`]:{backgroundColor:e.trackHoverBg},[`${t}-dot`]:{borderColor:c},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${a(g)} ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.dotActiveBorderColor}},[`${t}-handle`]:{position:"absolute",width:h,height:h,outline:"none",userSelect:"none","&-dragging-delete":{opacity:0},"&::before":{content:'""',position:"absolute",insetInlineStart:d(g).mul(-1).equal(),insetBlockStart:d(g).mul(-1).equal(),width:d(h).add(d(g).mul(2)).equal(),height:d(h).add(d(g).mul(2)).equal(),backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:h,height:h,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${a(g)} ${e.handleColor}`,outline:"0px solid transparent",borderRadius:"50%",cursor:"pointer",transition:`\n inset-inline-start ${v},\n inset-block-start ${v},\n width ${v},\n height ${v},\n box-shadow ${v},\n outline ${v}\n `},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:d(p).sub(h).div(2).add(y).mul(-1).equal(),insetBlockStart:d(p).sub(h).div(2).add(y).mul(-1).equal(),width:d(p).add(d(y).mul(2)).equal(),height:d(p).add(d(y).mul(2)).equal()},"&::after":{boxShadow:`0 0 0 ${a(y)} ${m}`,outline:`6px solid ${f}`,width:p,height:p,insetInlineStart:e.calc(h).sub(p).div(2).equal(),insetBlockStart:e.calc(h).sub(p).div(2).equal()}}},[`&-lock ${t}-handle`]:{"&::before, &::after":{transition:"none"}},[`${t}-mark`]:{position:"absolute",fontSize:e.fontSize},[`${t}-mark-text`]:{position:"absolute",display:"inline-block",color:e.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:e.colorText}},[`${t}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${t}-dot`]:{position:"absolute",width:o,height:o,backgroundColor:e.colorBgElevated,border:`${a(g)} solid ${e.dotBorderColor}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,pointerEvents:"auto","&-active":{borderColor:e.dotActiveBorderColor}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-rail`]:{backgroundColor:`${e.railBg} !important`},[`${t}-track`]:{backgroundColor:`${e.trackBgDisabled} !important`},[`\n ${t}-dot\n `]:{backgroundColor:e.colorBgElevated,borderColor:e.trackBgDisabled,boxShadow:"none",cursor:"not-allowed"},[`${t}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:"not-allowed",width:h,height:h,boxShadow:`0 0 0 ${a(g)} ${u}`,insetInlineStart:0,insetBlockStart:0},[`\n ${t}-mark-text,\n ${t}-dot\n `]:{cursor:"not-allowed !important"}},[`&-tooltip ${n}-tooltip-inner`]:{minWidth:"unset"}})}},of=(e,t)=>{const{componentCls:n,railSize:i,handleSize:o,dotSize:r,marginFull:s,calc:l}=e,c=t?"paddingBlock":"paddingInline",u=t?"width":"height",d=t?"height":"width",h=t?"insetBlockStart":"insetInlineStart",p=t?"top":"insetInlineStart",m=l(i).mul(3).sub(o).div(2).equal(),f=l(o).sub(i).div(2).equal(),g=t?{borderWidth:`${a(f)} 0`,transform:`translateY(${a(l(f).mul(-1).equal())})`}:{borderWidth:`0 ${a(f)}`,transform:`translateX(${a(e.calc(f).mul(-1).equal())})`};return{[c]:i,[d]:l(i).mul(3).equal(),[`${n}-rail`]:{[u]:"100%",[d]:i},[`${n}-track,${n}-tracks`]:{[d]:i},[`${n}-track-draggable`]:Object.assign({},g),[`${n}-handle`]:{[h]:m},[`${n}-mark`]:{insetInlineStart:0,top:0,[p]:l(i).mul(3).add(t?0:s).equal(),[u]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[p]:i,[u]:"100%",[d]:i},[`${n}-dot`]:{position:"absolute",[h]:l(i).sub(r).div(2).equal()}}},rf=e=>{const{componentCls:t,marginPartWithMark:n}=e;return{[`${t}-horizontal`]:Object.assign(Object.assign({},of(e,!0)),{[`&${t}-with-marks`]:{marginBottom:n}})}},af=e=>{const{componentCls:t}=e;return{[`${t}-vertical`]:Object.assign(Object.assign({},of(e,!1)),{height:"100%"})}},sf=o("Slider",(e=>{const t=R(e,{marginPart:e.calc(e.controlHeight).sub(e.controlSize).div(2).equal(),marginFull:e.calc(e.controlSize).div(2).equal(),marginPartWithMark:e.calc(e.controlHeightLG).sub(e.controlSize).equal()});return[nf(t),rf(t),af(t)]}),(e=>{const t=e.controlHeightLG/4,n=e.controlHeightSM/2,i=e.lineWidth+1,o=e.lineWidth+1.5,r=e.colorPrimary,a=new Ee(r).setA(.2).toRgbString();return{controlSize:t,railSize:4,handleSize:t,handleSizeHover:n,dotSize:8,handleLineWidth:i,handleLineWidthHover:o,railBg:e.colorFillTertiary,railHoverBg:e.colorFillSecondary,trackBg:e.colorPrimaryBorder,trackHoverBg:e.colorPrimaryBorderHover,handleColor:e.colorPrimaryBorder,handleActiveColor:r,handleActiveOutlineColor:a,handleColorDisabled:new Ee(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString(),dotBorderColor:e.colorBorderSecondary,dotActiveBorderColor:e.colorPrimaryBorder,trackBgDisabled:e.colorBgContainerDisabled}})),lf=window.React;function cf(){const[e,t]=lf.useState(!1),n=lf.useRef(null),i=()=>{we.cancel(n.current)};return lf.useEffect((()=>i),[]),[e,e=>{i(),e?t(e):n.current=we((()=>{t(e)}))}]}var uf=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{prefixCls:n,range:i,className:o,rootClassName:r,style:a,disabled:c,tooltipPrefixCls:u,tipFormatter:d,tooltipVisible:h,getTooltipPopupContainer:p,tooltipPlacement:m,tooltip:f={},onChangeComplete:g,classNames:y,styles:v}=e,b=uf(e,["prefixCls","range","className","rootClassName","style","disabled","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement","tooltip","onChangeComplete","classNames","styles"]),{vertical:w}=e,{getPrefixCls:x,direction:C,className:_,style:S,classNames:k,styles:E,getPopupContainer:$}=s("slider"),M=df.useContext(Be),R=null!=c?c:M,{handleRender:A,direction:O}=df.useContext(Xm),j="rtl"===(O||C),[T,N]=cf(),[L,I]=cf(),D=Object.assign({},f),{open:H,placement:P,getPopupContainer:z,prefixCls:F,formatter:V}=D,B=null!=H?H:h,W=(T||L)&&!1!==B,U=function(e,t){return e||null===e?e:t||null===t?t:e=>"number"==typeof e?e.toString():""}(V,d),[Y,Z]=cf(),G=(e,t)=>e||(t?j?"left":"right":"top"),q=x("slider",n),[K,Q,X]=sf(q),J=l(o,_,k.root,null==y?void 0:y.root,r,{[`${q}-rtl`]:j,[`${q}-lock`]:Y},Q,X);j&&!b.vertical&&(b.reverse=!b.reverse),df.useEffect((()=>{const e=()=>{we((()=>{I(!1)}),1)};return document.addEventListener("mouseup",e),()=>{document.removeEventListener("mouseup",e)}}),[]);const ee=i&&!B,te=A||((e,t)=>{const{index:n}=t,i=e.props;function o(e,t,n){var o,r,a,s;n&&(null===(r=(o=b)[e])||void 0===r||r.call(o,t)),null===(s=(a=i)[e])||void 0===s||s.call(a,t)}const r=Object.assign(Object.assign({},i),{onMouseEnter:e=>{N(!0),o("onMouseEnter",e)},onMouseLeave:e=>{N(!1),o("onMouseLeave",e)},onMouseDown:e=>{I(!0),Z(!0),o("onMouseDown",e)},onFocus:e=>{var t;I(!0),null===(t=b.onFocus)||void 0===t||t.call(b,e),o("onFocus",e,!0)},onBlur:e=>{var t;I(!1),null===(t=b.onBlur)||void 0===t||t.call(b,e),o("onBlur",e,!0)}}),a=df.cloneElement(e,r),s=(!!B||W)&&null!==U;return ee?a:df.createElement(tf,Object.assign({},D,{prefixCls:x("tooltip",null!=F?F:u),title:U?U(t.value):"",value:t.value,open:s,placement:G(null!=P?P:m,w),key:n,classNames:{root:`${q}-tooltip`},getPopupContainer:z||p||$}),a)}),ne=ee?(e,t)=>{const n=df.cloneElement(e,{style:Object.assign(Object.assign({},e.props.style),{visibility:"hidden"})});return df.createElement(tf,Object.assign({},D,{prefixCls:x("tooltip",null!=F?F:u),title:U?U(t.value):"",open:null!==U&&W,placement:G(null!=P?P:m,w),key:"tooltip",classNames:{root:`${q}-tooltip`},getPopupContainer:z||p||$,draggingDelete:t.draggingDelete}),n)}:void 0,ie=Object.assign(Object.assign(Object.assign(Object.assign({},E.root),S),null==v?void 0:v.root),a),oe=Object.assign(Object.assign({},E.tracks),null==v?void 0:v.tracks),re=l(k.tracks,null==y?void 0:y.tracks);return K(df.createElement(Qm,Object.assign({},b,{classNames:Object.assign({handle:l(k.handle,null==y?void 0:y.handle),rail:l(k.rail,null==y?void 0:y.rail),track:l(k.track,null==y?void 0:y.track)},re?{tracks:re}:{}),styles:Object.assign({handle:Object.assign(Object.assign({},E.handle),null==v?void 0:v.handle),rail:Object.assign(Object.assign({},E.rail),null==v?void 0:v.rail),track:Object.assign(Object.assign({},E.track),null==v?void 0:v.track)},Object.keys(oe).length?{tracks:oe}:{}),step:b.step,range:i,className:J,style:ie,disabled:R,ref:t,prefixCls:q,handleRender:te,activeHandleRender:ne,onChangeComplete:e=>{null==g||g(e),Z(!1)}})))}));var pf=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{prefixCls:t,colors:n,type:i,color:o,range:r=!1,className:a,activeIndex:s,onActive:c,onDragStart:u,onDragChange:d,onKeyDelete:h}=e,p=pf(e,["prefixCls","colors","type","color","range","className","activeIndex","onActive","onDragStart","onDragChange","onKeyDelete"]),m=Object.assign(Object.assign({},p),{track:!1}),f=mf.useMemo((()=>`linear-gradient(90deg, ${n.map((e=>`${e.color} ${e.percent}%`)).join(", ")})`),[n]),g=mf.useMemo((()=>o&&i?"alpha"===i?o.toRgbString():`hsl(${o.toHsb().h}, 100%, 50%)`:null),[o,i]),y=M(u),v=M(d),b=mf.useMemo((()=>({onDragStart:y,onDragChange:v})),[]),w=M(((e,o)=>{const{onFocus:r,style:a,className:u,onKeyDown:d}=e.props,p=Object.assign({},a);return"gradient"===i&&(p.background=Ge(n,o.value)),mf.cloneElement(e,{onFocus:e=>{null==c||c(o.index),null==r||r(e)},style:p,className:l(u,{[`${t}-slider-handle-active`]:s===o.index}),onKeyDown:e=>{"Delete"!==e.key&&"Backspace"!==e.key||!h||h(o.index),null==d||d(e)}})})),x=mf.useMemo((()=>({direction:"ltr",handleRender:w})),[]);return mf.createElement(Xm.Provider,{value:x},mf.createElement(Em.Provider,{value:b},mf.createElement(hf,Object.assign({},m,{className:l(a,`${t}-slider`),tooltip:{open:!1},range:{editable:r,minCount:2},styles:{rail:{background:f},handle:g?{background:g}:{}},classNames:{rail:`${t}-slider-rail`,handle:`${t}-slider-handle`}}))))},gf=window.React;function yf(e){return $(e).sort(((e,t)=>e.percent-t.percent))}const vf=e=>{const{prefixCls:t,mode:n,onChange:i,onChangeComplete:o,onActive:r,activeIndex:a,onGradientDragging:s,colors:l}=e,c="gradient"===n,u=gf.useMemo((()=>l.map((e=>({percent:e.percent,color:e.color.toRgbString()})))),[l]),d=gf.useMemo((()=>u.map((e=>e.percent))),[u]),h=gf.useRef(u);return c?gf.createElement(ff,{min:0,max:100,prefixCls:t,className:`${t}-gradient-slider`,colors:u,color:null,value:d,range:!0,onChangeComplete:e=>{o(new qe(u)),a>=e.length&&r(e.length-1),s(!1)},disabled:!1,type:"gradient",activeIndex:a,onActive:r,onDragStart:({rawValues:e,draggingIndex:t,draggingValue:n})=>{if(e.length>u.length){const e=Ge(u,n),i=$(u);i.splice(t,0,{percent:n,color:e}),h.current=i}else h.current=u;s(!0),i(new qe(yf(h.current)),!0)},onDragChange:({deleteIndex:e,draggingIndex:t,draggingValue:n})=>{let o=$(h.current);-1!==e?o.splice(e,1):(o[t]=Object.assign(Object.assign({},o[t]),{percent:n}),o=yf(o)),i(new qe(o),!0)},onKeyDelete:e=>{const t=$(u);t.splice(e,1);const n=new qe(t);i(n),o(n)}}):null},bf=gf.memo(vf);var wf=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{value:t,onChange:n,onChangeComplete:i}=e;return mf.createElement(ff,Object.assign({},e,{value:[t],onChange:e=>n(e[0]),onChangeComplete:e=>i(e[0])}))}},Sf=()=>{const e=Cf(cp),{mode:t,onModeChange:n,modeOptions:i,prefixCls:o,allowClear:r,value:a,disabledAlpha:s,onChange:l,onClear:c,onChangeComplete:u,activeIndex:d,gradientDragging:h}=e,p=wf(e,["mode","onModeChange","modeOptions","prefixCls","allowClear","value","disabledAlpha","onChange","onClear","onChangeComplete","activeIndex","gradientDragging"]),m=xf.useMemo((()=>a.cleared?[{percent:0,color:new qe("")},{percent:100,color:new qe("")}]:a.getColors()),[a]),f=!a.isGradient(),[g,y]=xf.useState(a);_e((()=>{var e;f||y(null===(e=m[d])||void 0===e?void 0:e.color)}),[h,d]);const v=xf.useMemo((()=>{var e;return f?a:h?g:null===(e=m[d])||void 0===e?void 0:e.color}),[a,d,f,g,h]),[b,w]=xf.useState(v),[x,C]=xf.useState(0),_=(null==b?void 0:b.equals(v))?v:b;_e((()=>{w(v)}),[x,null==v?void 0:v.toHexString()]);const S=(e,n)=>{let i=Pe(e);if(a.cleared){const e=i.toRgb();if(e.r||e.g||e.b||!n)i=Qe(i);else{const{type:e,value:t=0}=n;i=new qe({h:"hue"===e?t:0,s:1,b:1,a:"alpha"===e?t/100:1})}}if("single"===t)return i;const o=$(m);return o[d]=Object.assign(Object.assign({},o[d]),{color:i}),new qe(o)};let k=null;const E=i.length>1;return(r||E)&&(k=xf.createElement("div",{className:`${o}-operation`},E&&xf.createElement(sp,{size:"small",options:i,value:t,onChange:n}),xf.createElement(hp,Object.assign({prefixCls:o,value:a,onChange:e=>{l(e),null==c||c()}},p)))),xf.createElement(xf.Fragment,null,k,xf.createElement(bf,Object.assign({},e,{colors:m})),xf.createElement(Ke,{prefixCls:o,value:null==_?void 0:_.toHsb(),disabledAlpha:s,onChange:(e,t)=>{((e,t,n)=>{const i=S(e,n);w(i.isGradient()?i.getColors()[d].color:i),l(i,!0)})(e,0,t)},onChangeComplete:(e,t)=>{((e,t)=>{u(S(e,t)),C((e=>e+1))})(e,t)},components:_f}),xf.createElement(wm,Object.assign({value:v,onChange:e=>{l(S(e))},prefixCls:o,disabledAlpha:s},p)))},kf=window.React,Ef=window.React.useContext,$f=()=>{const{prefixCls:e,value:t,presets:n,onChange:i}=Ef(up);return Array.isArray(n)?kf.createElement(Xt,{value:t,presets:n,prefixCls:e,onChange:i}):null},Mf=window.React,Rf=e=>{const{prefixCls:t,presets:n,panelRender:i,value:o,onChange:r,onClear:a,allowClear:s,disabledAlpha:l,mode:c,onModeChange:u,modeOptions:d,onChangeComplete:h,activeIndex:p,onActive:m,format:f,onFormatChange:g,gradientDragging:y,onGradientDragging:v,disabledFormat:b}=e,w=`${t}-inner`,x=Mf.useMemo((()=>({prefixCls:t,value:o,onChange:r,onClear:a,allowClear:s,disabledAlpha:l,mode:c,onModeChange:u,modeOptions:d,onChangeComplete:h,activeIndex:p,onActive:m,format:f,onFormatChange:g,gradientDragging:y,onGradientDragging:v,disabledFormat:b})),[t,o,r,a,s,l,c,u,d,h,p,m,f,g,y,v,b]),C=Mf.useMemo((()=>({prefixCls:t,value:o,presets:n,onChange:r})),[t,o,n,r]),_=Mf.createElement("div",{className:`${w}-content`},Mf.createElement(Sf,null),Array.isArray(n)&&Mf.createElement(Yh,null),Mf.createElement($f,null));return Mf.createElement(cp.Provider,{value:x},Mf.createElement(up.Provider,{value:C},Mf.createElement("div",{className:w},"function"==typeof i?i(_,{components:{Picker:Sf,Presets:$f}}):_)))};var Af=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{color:n,prefixCls:i,open:o,disabled:r,format:a,className:s,showText:c,activeIndex:u}=e,d=Af(e,["color","prefixCls","open","disabled","format","className","showText","activeIndex"]),h=`${i}-trigger`,p=`${h}-text`,m=`${p}-cell`,[f]=F("ColorPicker"),g=Of.useMemo((()=>{if(!c)return"";if("function"==typeof c)return c(n);if(n.cleared)return f.transparent;if(n.isGradient())return n.getColors().map(((e,t)=>{const n=-1!==u&&u!==t;return Of.createElement("span",{key:t,className:l(m,n&&`${m}-inactive`)},e.color.toRgbString()," ",e.percent,"%")}));const e=n.toHexString().toUpperCase(),t=We(n);switch(a){case"rgb":return n.toRgbString();case"hsb":return n.toHsbString();default:return t<100?`${e.slice(0,7)},${t}%`:e}}),[n,a,c,u]),y=Tf((()=>n.cleared?Of.createElement(hp,{prefixCls:i}):Of.createElement(Xe,{prefixCls:i,color:n.toCssString()})),[n,i]);return Of.createElement("div",Object.assign({ref:t,className:l(h,s,{[`${h}-active`]:o,[`${h}-disabled`]:r})},bt(d)),y,c&&Of.createElement("div",{className:p},g))})),Lf=window.React,If=(e,t)=>({backgroundImage:`conic-gradient(${t} 25%, transparent 25% 50%, ${t} 50% 75%, transparent 75% 100%)`,backgroundSize:`${e} ${e}`}),Df=(e,t)=>{const{componentCls:n,borderRadiusSM:i,colorPickerInsetShadow:o,lineWidth:r,colorFillSecondary:s}=e;return{[`${n}-color-block`]:Object.assign(Object.assign({position:"relative",borderRadius:i,width:t,height:t,boxShadow:o,flex:"none"},If("50%",e.colorFillSecondary)),{[`${n}-color-block-inner`]:{width:"100%",height:"100%",boxShadow:`inset 0 0 0 ${a(r)} ${s}`,borderRadius:"inherit"}})}},Hf=e=>{const{componentCls:t,antCls:n,fontSizeSM:i,lineHeightSM:o,colorPickerAlphaInputWidth:r,marginXXS:s,paddingXXS:l,controlHeightSM:c,marginXS:u,fontSizeIcon:d,paddingXS:h,colorTextPlaceholder:p,colorPickerInputNumberHandleWidth:m,lineWidth:f}=e;return{[`${t}-input-container`]:{display:"flex",[`${t}-steppers${n}-input-number`]:{fontSize:i,lineHeight:o,[`${n}-input-number-input`]:{paddingInlineStart:l,paddingInlineEnd:0},[`${n}-input-number-handler-wrap`]:{width:m}},[`${t}-steppers${t}-alpha-input`]:{flex:`0 0 ${a(r)}`,marginInlineStart:s},[`${t}-format-select${n}-select`]:{marginInlineEnd:u,width:"auto","&-single":{[`${n}-select-selector`]:{padding:0,border:0},[`${n}-select-arrow`]:{insetInlineEnd:0},[`${n}-select-selection-item`]:{paddingInlineEnd:e.calc(d).add(s).equal(),fontSize:i,lineHeight:a(c)},[`${n}-select-item-option-content`]:{fontSize:i,lineHeight:o},[`${n}-select-dropdown`]:{[`${n}-select-item`]:{minHeight:"auto"}}}},[`${t}-input`]:{gap:s,alignItems:"center",flex:1,width:0,[`${t}-hsb-input,${t}-rgb-input`]:{display:"flex",gap:s,alignItems:"center"},[`${t}-steppers`]:{flex:1},[`${t}-hex-input${n}-input-affix-wrapper`]:{flex:1,padding:`0 ${a(h)}`,[`${n}-input`]:{fontSize:i,textTransform:"uppercase",lineHeight:a(e.calc(c).sub(e.calc(f).mul(2)).equal())},[`${n}-input-prefix`]:{color:p}}}}}},Pf=e=>{const{componentCls:t,controlHeightLG:n,borderRadiusSM:i,colorPickerInsetShadow:o,marginSM:r,colorBgElevated:s,colorFillSecondary:l,lineWidthBold:c,colorPickerHandlerSize:u}=e;return{userSelect:"none",[`${t}-select`]:{[`${t}-palette`]:{minHeight:e.calc(n).mul(4).equal(),overflow:"hidden",borderRadius:i},[`${t}-saturation`]:{position:"absolute",borderRadius:"inherit",boxShadow:o,inset:0},marginBottom:r},[`${t}-handler`]:{width:u,height:u,border:`${a(c)} solid ${s}`,position:"relative",borderRadius:"50%",cursor:"pointer",boxShadow:`${o}, 0 0 0 1px ${l}`}}},zf=e=>{const{componentCls:t,antCls:n,colorTextQuaternary:i,paddingXXS:o,colorPickerPresetColorSize:r,fontSizeSM:s,colorText:l,lineHeightSM:c,lineWidth:u,borderRadius:d,colorFill:h,colorWhite:p,marginXXS:m,paddingXS:f,fontHeightSM:g}=e;return{[`${t}-presets`]:{[`${n}-collapse-item > ${n}-collapse-header`]:{padding:0,[`${n}-collapse-expand-icon`]:{height:g,color:i,paddingInlineEnd:o}},[`${n}-collapse`]:{display:"flex",flexDirection:"column",gap:m},[`${n}-collapse-item > ${n}-collapse-content > ${n}-collapse-content-box`]:{padding:`${a(f)} 0`},"&-label":{fontSize:s,color:l,lineHeight:c},"&-items":{display:"flex",flexWrap:"wrap",gap:e.calc(m).mul(1.5).equal(),[`${t}-presets-color`]:{position:"relative",cursor:"pointer",width:r,height:r,"&::before":{content:'""',pointerEvents:"none",width:e.calc(r).add(e.calc(u).mul(4)).equal(),height:e.calc(r).add(e.calc(u).mul(4)).equal(),position:"absolute",top:e.calc(u).mul(-2).equal(),insetInlineStart:e.calc(u).mul(-2).equal(),borderRadius:d,border:`${a(u)} solid transparent`,transition:`border-color ${e.motionDurationMid} ${e.motionEaseInBack}`},"&:hover::before":{borderColor:h},"&::after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:e.calc(r).div(13).mul(5).equal(),height:e.calc(r).div(13).mul(8).equal(),border:`${a(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`},[`&${t}-presets-color-checked`]:{"&::after":{opacity:1,borderColor:p,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`transform ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`},[`&${t}-presets-color-bright`]:{"&::after":{borderColor:"rgba(0, 0, 0, 0.45)"}}}}},"&-empty":{fontSize:s,color:i}}}},Ff=e=>{const{componentCls:t,colorPickerInsetShadow:n,colorBgElevated:i,colorFillSecondary:o,lineWidthBold:r,colorPickerHandlerSizeSM:s,colorPickerSliderHeight:l,marginSM:c,marginXS:u}=e,d=e.calc(s).sub(e.calc(r).mul(2).equal()).equal(),h=e.calc(s).add(e.calc(r).mul(2).equal()).equal(),p={"&:after":{transform:"scale(1)",boxShadow:`${n}, 0 0 0 1px ${e.colorPrimaryActive}`}};return{[`${t}-slider`]:[If(a(l),e.colorFillSecondary),{margin:0,padding:0,height:l,borderRadius:e.calc(l).div(2).equal(),"&-rail":{height:l,borderRadius:e.calc(l).div(2).equal(),boxShadow:n},[`& ${t}-slider-handle`]:{width:d,height:d,top:0,borderRadius:"100%","&:before":{display:"block",position:"absolute",background:"transparent",left:{_skip_check_:!0,value:"50%"},top:"50%",transform:"translate(-50%, -50%)",width:h,height:h,borderRadius:"100%"},"&:after":{width:s,height:s,border:`${a(r)} solid ${i}`,boxShadow:`${n}, 0 0 0 1px ${o}`,outline:"none",insetInlineStart:e.calc(r).mul(-1).equal(),top:e.calc(r).mul(-1).equal(),background:"transparent",transition:"none"},"&:focus":p}}],[`${t}-slider-container`]:{display:"flex",gap:c,marginBottom:c,[`${t}-slider-group`]:{flex:1,flexDirection:"column",justifyContent:"space-between",display:"flex","&-disabled-alpha":{justifyContent:"center"}}},[`${t}-gradient-slider`]:{marginBottom:u,[`& ${t}-slider-handle`]:{"&:after":{transform:"scale(0.8)"},"&-active, &:focus":p}}}},Vf=(e,t,n)=>({borderInlineEndWidth:e.lineWidth,borderColor:t,boxShadow:`0 0 0 ${a(e.controlOutlineWidth)} ${n}`,outline:0}),Bf=e=>{const{componentCls:t}=e;return{"&-rtl":{[`${t}-presets-color`]:{"&::after":{direction:"ltr"}},[`${t}-clear`]:{"&::after":{direction:"ltr"}}}}},Wf=(e,t,n)=>{const{componentCls:i,borderRadiusSM:o,lineWidth:r,colorSplit:s,colorBorder:l,red6:c}=e;return{[`${i}-clear`]:Object.assign(Object.assign({width:t,height:t,borderRadius:o,border:`${a(r)} solid ${s}`,position:"relative",overflow:"hidden",cursor:"inherit",transition:`all ${e.motionDurationFast}`},n),{"&::after":{content:'""',position:"absolute",insetInlineEnd:e.calc(r).mul(-1).equal(),top:e.calc(r).mul(-1).equal(),display:"block",width:40,height:2,transformOrigin:"calc(100% - 1px) 1px",transform:"rotate(-45deg)",backgroundColor:c},"&:hover":{borderColor:l}})}},Uf=e=>{const{componentCls:t,colorError:n,colorWarning:i,colorErrorHover:o,colorWarningHover:r,colorErrorOutline:a,colorWarningOutline:s}=e;return{[`&${t}-status-error`]:{borderColor:n,"&:hover":{borderColor:o},[`&${t}-trigger-active`]:Object.assign({},Vf(e,n,a))},[`&${t}-status-warning`]:{borderColor:i,"&:hover":{borderColor:r},[`&${t}-trigger-active`]:Object.assign({},Vf(e,i,s))}}},Yf=e=>{const{componentCls:t,controlHeightLG:n,controlHeightSM:i,controlHeight:o,controlHeightXS:r,borderRadius:s,borderRadiusSM:l,borderRadiusXS:c,borderRadiusLG:u,fontSizeLG:d}=e;return{[`&${t}-lg`]:{minWidth:n,minHeight:n,borderRadius:u,[`${t}-color-block, ${t}-clear`]:{width:o,height:o,borderRadius:s},[`${t}-trigger-text`]:{fontSize:d}},[`&${t}-sm`]:{minWidth:i,minHeight:i,borderRadius:l,[`${t}-color-block, ${t}-clear`]:{width:r,height:r,borderRadius:c},[`${t}-trigger-text`]:{lineHeight:a(r)}}}},Zf=o("ColorPicker",(e=>{const{colorTextQuaternary:t,marginSM:n}=e;return(e=>{const{antCls:t,componentCls:n,colorPickerWidth:i,colorPrimary:o,motionDurationMid:r,colorBgElevated:s,colorTextDisabled:l,colorText:c,colorBgContainerDisabled:u,borderRadius:d,marginXS:h,marginSM:p,controlHeight:m,controlHeightSM:f,colorBgTextActive:g,colorPickerPresetColorSize:y,colorPickerPreviewSize:v,lineWidth:b,colorBorder:w,paddingXXS:x,fontSize:C,colorPrimaryHover:_,controlOutline:S}=e;return[{[n]:Object.assign({[`${n}-inner`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({"&-content":{display:"flex",flexDirection:"column",width:i,[`& > ${t}-divider`]:{margin:`${a(p)} 0 ${a(h)}`}},[`${n}-panel`]:Object.assign({},Pf(e))},Ff(e)),Df(e,v)),Hf(e)),zf(e)),Wf(e,y,{marginInlineStart:"auto"})),{[`${n}-operation`]:{display:"flex",justifyContent:"space-between",marginBottom:h}}),"&-trigger":Object.assign(Object.assign(Object.assign(Object.assign({minWidth:m,minHeight:m,borderRadius:d,border:`${a(b)} solid ${w}`,cursor:"pointer",display:"inline-flex",alignItems:"flex-start",justifyContent:"center",transition:`all ${r}`,background:s,padding:e.calc(x).sub(b).equal(),[`${n}-trigger-text`]:{marginInlineStart:h,marginInlineEnd:e.calc(h).sub(e.calc(x).sub(b)).equal(),fontSize:C,color:c,alignSelf:"center","&-cell":{"&:not(:last-child):after":{content:'", "'},"&-inactive":{color:l}}},"&:hover":{borderColor:_},[`&${n}-trigger-active`]:Object.assign({},Vf(e,o,S)),"&-disabled":{color:l,background:u,cursor:"not-allowed","&:hover":{borderColor:g},[`${n}-trigger-text`]:{color:l}}},Wf(e,f)),Df(e,f)),Uf(e)),Yf(e))},Bf(e))},It(e,{focusElCls:`${n}-trigger-active`})]})(R(e,{colorPickerWidth:234,colorPickerHandlerSize:16,colorPickerHandlerSizeSM:12,colorPickerAlphaInputWidth:44,colorPickerInputNumberHandleWidth:16,colorPickerPresetColorSize:24,colorPickerInsetShadow:`inset 0 0 1px 0 ${t}`,colorPickerSliderHeight:8,colorPickerPreviewSize:e.calc(8).mul(2).add(n).equal()}))}));var Gf=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{mode:t,value:n,defaultValue:i,format:o,defaultFormat:r,allowClear:a=!1,presets:s,children:c,trigger:u="click",open:d,disabled:h,placement:p="bottomLeft",arrow:m=!0,panelRender:f,showText:g,style:y,className:v,size:b,rootClassName:w,prefixCls:x,styles:C,disabledAlpha:_=!1,onFormatChange:S,onChange:k,onClear:E,onOpenChange:$,onChangeComplete:R,getPopupContainer:A,autoAdjustOverflow:O=!0,destroyTooltipOnHide:N,destroyOnHidden:L,disabledFormat:I}=e,D=Gf(e,["mode","value","defaultValue","format","defaultFormat","allowClear","presets","children","trigger","open","disabled","placement","arrow","panelRender","showText","style","className","size","rootClassName","prefixCls","styles","disabledAlpha","onFormatChange","onChange","onClear","onOpenChange","onChangeComplete","getPopupContainer","autoAdjustOverflow","destroyTooltipOnHide","destroyOnHidden","disabledFormat"]),{getPrefixCls:H,direction:P,colorPicker:z}=Kf(j),V=Kf(Be),B=null!=h?h:V,[W,U]=de(!1,{value:d,postState:e=>!B&&e,onChange:$}),[Y,Z]=de(o,{value:o,defaultValue:r,onChange:S}),G=H("color-picker",x),[q,K,Q,J,ee]=function(e,t,n){const[i]=F("ColorPicker"),[o,r]=de(e,{value:t}),[a,s]=Lf.useState("single"),[l,c]=Lf.useMemo((()=>{const e=(Array.isArray(n)?n:[n]).filter((e=>e));e.length||e.push("single");const t=new Set(e),o=[],r=(e,n)=>{t.has(e)&&o.push({label:n,value:e})};return r("single",i.singleColor),r("gradient",i.gradientColor),[o,t]}),[n]),[u,d]=Lf.useState(null),h=M((e=>{d(e),r(e)})),p=Lf.useMemo((()=>{const e=Pe(o||"");return e.equals(u)?u:e}),[o,u]),m=Lf.useMemo((()=>{var e;return c.has(a)?a:null===(e=l[0])||void 0===e?void 0:e.value}),[c,a,l]);return Lf.useEffect((()=>{s(p.isGradient()?"gradient":"single")}),[p]),[p,h,m,s,l]}(i,n,t),te=Qf((()=>We(q)<100),[q]),[ne,ie]=qf.useState(null),oe=e=>{if(R){let t=Pe(e);_&&te&&(t=Qe(e)),R(t)}},re=(e,t)=>{let n=Pe(e);_&&te&&(n=Qe(n)),K(n),ie(null),k&&k(n,n.toCssString()),t||oe(n)},[ae,se]=qf.useState(0),[le,ce]=qf.useState(!1),{status:ue}=qf.useContext(Ve),{compactSize:he,compactItemClassnames:pe}=Fe(G,P),me=De((e=>{var t;return null!==(t=null!=b?b:he)&&void 0!==t?t:e})),fe=T(G),[ge,ye,ve]=Zf(G,fe),be=l(w,ve,fe,{[`${G}-rtl`]:P}),we=l(Gt(G,ue),{[`${G}-sm`]:"small"===me,[`${G}-lg`]:"large"===me},pe,null==z?void 0:z.className,be,v,ye),xe=l(G,be),Ce={open:W,trigger:u,placement:p,arrow:m,rootClassName:w,getPopupContainer:A,autoAdjustOverflow:O,destroyOnHidden:null!=L?L:!!N},_e=Object.assign(Object.assign({},null==z?void 0:z.style),y);return ge(qf.createElement(Ea,Object.assign({style:null==C?void 0:C.popup,styles:{body:null==C?void 0:C.popupOverlayInner},onOpenChange:e=>{e&&B||U(e)},content:qf.createElement(X,{form:!0},qf.createElement(Rf,{mode:Q,onModeChange:e=>{if(J(e),"single"===e&&q.isGradient())se(0),re(new qe(q.getColors()[0].color)),ie(q);else if("gradient"===e&&!q.isGradient()){const e=te?Qe(q):q;re(new qe(ne||[{percent:0,color:e},{percent:100,color:e}]))}},modeOptions:ee,prefixCls:G,value:q,allowClear:a,disabled:B,disabledAlpha:_,presets:s,panelRender:f,format:Y,onFormatChange:Z,onChange:re,onChangeComplete:oe,onClear:E,activeIndex:ae,onActive:se,gradientDragging:le,onGradientDragging:ce,disabledFormat:I})),classNames:{root:xe}},Ce),c||qf.createElement(Nf,Object.assign({activeIndex:W?ae:-1,open:W,className:we,style:_e,prefixCls:G,disabled:B,showText:g,format:Y},D,{color:q}))))},Jf=Jt(Xf,void 0,(e=>Object.assign(Object.assign({},e),{placement:"bottom",autoAdjustOverflow:!1})),"color-picker",(e=>e));Xf._InternalPanelDoNotUseOrYouWillBeFired=Jf;const eg=Xf,tg={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"},ng=window.React;var ig=function(e,t){return ng.createElement(n,i({},e,{ref:t,icon:tg}))};const og=ng.forwardRef(ig),rg={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"},ag=window.React;var sg=function(e,t){return ag.createElement(n,i({},e,{ref:t,icon:rg}))};const lg=ag.forwardRef(sg),cg={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z"}}]},name:"swap-right",theme:"outlined"},ug=window.React;var dg=function(e,t){return ug.createElement(n,i({},e,{ref:t,icon:cg}))};const hg=ug.forwardRef(dg),pg=window.React;function mg(e,t,n){return void 0!==n?n:"year"===t&&e.lang.yearPlaceholder?e.lang.yearPlaceholder:"quarter"===t&&e.lang.quarterPlaceholder?e.lang.quarterPlaceholder:"month"===t&&e.lang.monthPlaceholder?e.lang.monthPlaceholder:"week"===t&&e.lang.weekPlaceholder?e.lang.weekPlaceholder:"time"===t&&e.timePickerLocale.placeholder?e.timePickerLocale.placeholder:e.lang.placeholder}function fg(e,t,n){return void 0!==n?n:"year"===t&&e.lang.yearPlaceholder?e.lang.rangeYearPlaceholder:"quarter"===t&&e.lang.quarterPlaceholder?e.lang.rangeQuarterPlaceholder:"month"===t&&e.lang.monthPlaceholder?e.lang.rangeMonthPlaceholder:"week"===t&&e.lang.weekPlaceholder?e.lang.rangeWeekPlaceholder:"time"===t&&e.timePickerLocale.placeholder?e.timePickerLocale.rangePlaceholder:e.lang.rangePlaceholder}function gg(e,t){const{allowClear:n=!0}=e,{clearIcon:i,removeIcon:o}=en(Object.assign(Object.assign({},e),{prefixCls:t,componentName:"DatePicker"}));return[pg.useMemo((()=>{if(!1===n)return!1;const e=!0===n?{}:n;return Object.assign({clearIcon:i},e)}),[n,i]),o]}const[yg,vg]=["week","WeekPicker"],[bg,wg]=["month","MonthPicker"],[xg,Cg]=["year","YearPicker"],[_g,Sg]=["quarter","QuarterPicker"],[kg,Eg]=["time","TimePicker"],$g=window.React,Mg=e=>$g.createElement(Ct,Object.assign({size:"small",type:"primary"},e)),Rg=window.React.useMemo;function Ag(e){return Rg((()=>Object.assign({button:Mg},e)),[e])}const Og=window.React;function jg(e,...t){const n=e||{};return t.reduce(((e,t)=>(Object.keys(t||{}).forEach((i=>{const o=n[i],r=t[i];if(o&&"object"==typeof o)if(r&&"object"==typeof r)e[i]=jg(o,e[i],r);else{const{_default:t}=o;e[i]=e[i]||{},e[i][t]=l(e[i][t],r)}else e[i]=l(e[i],r)})),e)),{})}function Tg(e,...t){return Og.useMemo((()=>jg.apply(void 0,[e].concat(t))),[t])}function Ng(...e){return Og.useMemo((()=>e.reduce(((e,t={})=>(Object.keys(t).forEach((n=>{e[n]=Object.assign(Object.assign({},e[n]),t[n])})),e)),{})),[e])}function Lg(e,t){const n=Object.assign({},e);return Object.keys(t).forEach((e=>{if("_default"!==e){const i=t[e],o=n[e]||{};n[e]=i?Lg(o,i):o}})),n}function Ig(e,t,n){const i=Tg.apply(void 0,[n].concat($(e))),o=Ng.apply(void 0,$(t));return Og.useMemo((()=>[Lg(i,n),Lg(o,n)]),[i,o])}const Dg=window.React,Hg=(e,t,n,i,o)=>{const{classNames:r,styles:a}=s(e),[c,u]=Ig([r,t],[a,n],{popup:{_default:"root"}});return Dg.useMemo((()=>{var e,t;return[Object.assign(Object.assign({},c),{popup:Object.assign(Object.assign({},c.popup),{root:l(null===(e=c.popup)||void 0===e?void 0:e.root,i)})}),Object.assign(Object.assign({},u),{popup:Object.assign(Object.assign({},u.popup),{root:Object.assign(Object.assign({},null===(t=u.popup)||void 0===t?void 0:t.root),o)})})]}),[c,u,i,o])};var Pg=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{DatePicker:t,WeekPicker:n,MonthPicker:i,YearPicker:o,TimePicker:r,QuarterPicker:a}=(e=>{const t=(t,n)=>{const i=n===Eg?"timePicker":"datePicker";return Yg(((n,o)=>{var r;const{prefixCls:a,getPopupContainer:s,components:c,style:u,className:d,rootClassName:h,size:p,bordered:m,placement:f,placeholder:g,popupStyle:y,popupClassName:v,dropdownClassName:b,disabled:w,status:x,variant:C,onCalendarChange:_,styles:S,classNames:k}=n,E=Wg(n,["prefixCls","getPopupContainer","components","style","className","rootClassName","size","bordered","placement","placeholder","popupStyle","popupClassName","dropdownClassName","disabled","status","variant","onCalendarChange","styles","classNames"]),{getPrefixCls:$,direction:M,getPopupContainer:R,[i]:A}=Zg(j),O=$("picker",a),{compactSize:N,compactItemClassnames:L}=Fe(O,M),I=Ug.useRef(null),[D,H]=He("datePicker",C,m),P=T(O),[z,V,B]=Ju(O,P);Gg(o,(()=>I.current));const W=t||n.picker,U=$(),{onSelect:Y,multiple:Z}=E,G=Y&&"time"===t&&!Z,[q,K]=Hg(i,k,S,v||b,y),[J,ee]=gg(n,O),te=Ag(c),ne=De((e=>{var t;return null!==(t=null!=p?p:N)&&void 0!==t?t:e})),ie=Ug.useContext(Be),oe=null!=w?w:ie,re=Zg(Ve),{hasFeedback:ae,status:se,feedbackIcon:le}=re,ce=Ug.createElement(Ug.Fragment,null,"time"===W?Ug.createElement(lg,null):Ug.createElement(og,null),ae&&le),[ue]=F("DatePicker",Je),de=Object.assign(Object.assign({},ue),n.locale),[he]=Q("DatePicker",null===(r=K.popup.root)||void 0===r?void 0:r.zIndex);return z(Ug.createElement(X,{space:!0},Ug.createElement(Bu,Object.assign({ref:I,placeholder:mg(de,W,g),suffixIcon:ce,placement:f,prevIcon:Ug.createElement("span",{className:`${O}-prev-icon`}),nextIcon:Ug.createElement("span",{className:`${O}-next-icon`}),superPrevIcon:Ug.createElement("span",{className:`${O}-super-prev-icon`}),superNextIcon:Ug.createElement("span",{className:`${O}-super-next-icon`}),transitionName:`${U}-slide-up`,picker:t,onCalendarChange:(e,t,n)=>{null==_||_(e,t,n),G&&Y(e)}},{showToday:!0},E,{locale:de.lang,className:l({[`${O}-${ne}`]:ne,[`${O}-${D}`]:H},Gt(O,qt(se,x),ae),V,L,null==A?void 0:A.className,d,B,P,h,q.root),style:Object.assign(Object.assign(Object.assign({},null==A?void 0:A.style),u),K.root),prefixCls:O,getPopupContainer:s||R,generateConfig:e,components:te,direction:M,disabled:oe,classNames:{popup:l(V,B,P,h,q.popup.root)},styles:{popup:Object.assign(Object.assign({},K.popup.root),{zIndex:he})},allowClear:J,removeIcon:ee}))))}))},n=t(),i=t(yg,vg),o=t(bg,wg),r=t(xg,Cg),a=t(_g,Sg);return{DatePicker:n,WeekPicker:i,MonthPicker:o,YearPicker:r,TimePicker:t(kg,Eg),QuarterPicker:a}})(e),s=(e=>Fg(((t,n)=>{var i;const{prefixCls:o,getPopupContainer:r,components:a,className:s,style:c,placement:u,size:d,disabled:h,bordered:p=!0,placeholder:m,popupStyle:f,popupClassName:g,dropdownClassName:y,status:v,rootClassName:b,variant:w,picker:x,styles:C,classNames:_}=t,S=Pg(t,["prefixCls","getPopupContainer","components","className","style","placement","size","disabled","bordered","placeholder","popupStyle","popupClassName","dropdownClassName","status","rootClassName","variant","picker","styles","classNames"]),k=x===kg?"timePicker":"datePicker",E=zg.useRef(null),{getPrefixCls:$,direction:M,getPopupContainer:R,rangePicker:A}=Vg(j),O=$("picker",o),{compactSize:N,compactItemClassnames:L}=Fe(O,M),I=$(),[D,H]=He("rangePicker",w,p),P=T(O),[z,V,B]=Ju(O,P),[W,U]=Hg(k,_,C,g||y,f),[Y]=gg(t,O),Z=Ag(a),G=De((e=>{var t;return null!==(t=null!=d?d:N)&&void 0!==t?t:e})),q=zg.useContext(Be),K=null!=h?h:q,J=Vg(Ve),{hasFeedback:ee,status:te,feedbackIcon:ne}=J,ie=zg.createElement(zg.Fragment,null,x===kg?zg.createElement(lg,null):zg.createElement(og,null),ee&&ne);Bg(n,(()=>E.current));const[oe]=F("Calendar",Je),re=Object.assign(Object.assign({},oe),t.locale),[ae]=Q("DatePicker",null===(i=U.popup.root)||void 0===i?void 0:i.zIndex);return z(zg.createElement(X,{space:!0},zg.createElement(cu,Object.assign({separator:zg.createElement("span",{"aria-label":"to",className:`${O}-separator`},zg.createElement(hg,null)),disabled:K,ref:E,placement:u,placeholder:fg(re,x,m),suffixIcon:ie,prevIcon:zg.createElement("span",{className:`${O}-prev-icon`}),nextIcon:zg.createElement("span",{className:`${O}-next-icon`}),superPrevIcon:zg.createElement("span",{className:`${O}-super-prev-icon`}),superNextIcon:zg.createElement("span",{className:`${O}-super-next-icon`}),transitionName:`${I}-slide-up`,picker:x},S,{className:l({[`${O}-${G}`]:G,[`${O}-${D}`]:H},Gt(O,qt(te,v),ee),V,L,s,null==A?void 0:A.className,B,P,b,W.root),style:Object.assign(Object.assign(Object.assign({},null==A?void 0:A.style),c),U.root),locale:re.lang,prefixCls:O,getPopupContainer:r||R,generateConfig:e,components:Z,direction:M,classNames:{popup:l(V,B,P,b,W.popup.root)},styles:{popup:Object.assign(Object.assign({},U.popup.root),{zIndex:ae})},allowClear:Y}))))})))(e),c=t;return c.WeekPicker=n,c.MonthPicker=i,c.YearPicker=o,c.RangePicker=s,c.TimePicker=r,c.QuarterPicker=a,c},Kg=qg(js),Qg=Jt(Kg,"popupAlign",void 0,"picker");Kg._InternalPanelDoNotUseOrYouWillBeFired=Qg;const Xg=Jt(Kg.RangePicker,"popupAlign",void 0,"picker");Kg._InternalRangePanelDoNotUseOrYouWillBeFired=Xg,Kg.generatePicker=qg;const Jg=Kg,ey={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},ty=window.React;var ny=function(e,t){return ty.createElement(n,i({},e,{ref:t,icon:ey}))};const iy=ty.forwardRef(ny);function oy(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}var ry=window.React.createContext(null);const ay=window.React,sy=window.React.useContext;var ly=function(e){var t=e.visible,n=e.maskTransitionName,i=e.getContainer,o=e.prefixCls,r=e.rootClassName,a=e.icons,s=e.countRender,u=e.showSwitch,d=e.showProgress,h=e.current,p=e.transform,m=e.count,f=e.scale,g=e.minScale,y=e.maxScale,v=e.closeIcon,b=e.onActive,w=e.onClose,x=e.onZoomIn,C=e.onZoomOut,S=e.onRotateRight,k=e.onRotateLeft,$=e.onFlipX,M=e.onFlipY,R=e.onReset,A=e.toolbarRender,O=e.zIndex,j=e.image,T=sy(ry),N=a.rotateLeft,L=a.rotateRight,I=a.zoomIn,D=a.zoomOut,H=a.close,P=a.left,F=a.right,V=a.flipX,B=a.flipY,W="".concat(o,"-operations-operation");ay.useEffect((function(){var e=function(e){e.keyCode===xt.ESC&&w()};return t&&window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t]);var U=function(e,t){e.preventDefault(),e.stopPropagation(),b(t)},Y=ay.useCallback((function(e){var t=e.type,n=e.disabled,i=e.onClick,r=e.icon;return ay.createElement("div",{key:t,className:l(W,"".concat(o,"-operations-operation-").concat(t),_({},"".concat(o,"-operations-operation-disabled"),!!n)),onClick:i},r)}),[W,o]),Z=u?Y({icon:P,onClick:function(e){return U(e,-1)},type:"prev",disabled:0===h}):void 0,G=u?Y({icon:F,onClick:function(e){return U(e,1)},type:"next",disabled:h===m-1}):void 0,q=Y({icon:B,onClick:M,type:"flipY"}),K=Y({icon:V,onClick:$,type:"flipX"}),Q=Y({icon:N,onClick:k,type:"rotateLeft"}),X=Y({icon:L,onClick:S,type:"rotateRight"}),J=Y({icon:D,onClick:C,type:"zoomOut",disabled:f<=g}),ee=Y({icon:I,onClick:x,type:"zoomIn",disabled:f===y}),te=ay.createElement("div",{className:"".concat(o,"-operations")},q,K,Q,X,J,ee);return ay.createElement(c,{visible:t,motionName:n},(function(e){var t=e.className,n=e.style;return ay.createElement(z,{open:!0,getContainer:null!=i?i:document.body},ay.createElement("div",{className:l("".concat(o,"-operations-wrapper"),t,r),style:E(E({},n),{},{zIndex:O})},null===v?null:ay.createElement("button",{className:"".concat(o,"-close"),onClick:w},v||H),u&&ay.createElement(ay.Fragment,null,ay.createElement("div",{className:l("".concat(o,"-switch-left"),_({},"".concat(o,"-switch-left-disabled"),0===h)),onClick:function(e){return U(e,-1)}},P),ay.createElement("div",{className:l("".concat(o,"-switch-right"),_({},"".concat(o,"-switch-right-disabled"),h===m-1)),onClick:function(e){return U(e,1)}},F)),ay.createElement("div",{className:"".concat(o,"-footer")},d&&ay.createElement("div",{className:"".concat(o,"-progress")},s?s(h+1,m):ay.createElement("bdi",null,"".concat(h+1," / ").concat(m))),A?A(te,E(E({icons:{prevIcon:Z,nextIcon:G,flipYIcon:q,flipXIcon:K,rotateLeftIcon:Q,rotateRightIcon:X,zoomOutIcon:J,zoomInIcon:ee},actions:{onActive:b,onFlipY:M,onFlipX:$,onRotateLeft:k,onRotateRight:S,onZoomOut:C,onZoomIn:x,onReset:R,onClose:w},transform:p},T?{current:h,total:m}:{}),{},{image:j})):te)))}))};const cy=window.React.useRef,uy=window.React.useState;var dy={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function hy(e,t,n,i){var o=t+n,r=(n-i)/2;if(n>i){if(t>0)return _({},e,r);if(t<0&&oi)return _({},e,t<0?r:-r);return{}}function py(e,t,n,i){var o=oy(),r=o.width,a=o.height,s=null;return e<=r&&t<=a?s={x:0,y:0}:(e>r||t>a)&&(s=E(E({},hy("x",n,e,r)),hy("y",i,t,a))),s}const my=window.React.useEffect,fy=window.React.useRef,gy=window.React.useState,yy=window.React.useEffect,vy=window.React.useRef,by=window.React.useState;function wy(e){var t=e.src,n=e.isCustomPlaceholder,i=e.fallback,o=by(n?"loading":"normal"),r=x(o,2),a=r[0],s=r[1],l=vy(!1),c="error"===a;yy((function(){var e=!0;return function(e){return new Promise((function(t){if(e){var n=document.createElement("img");n.onerror=function(){return t(!1)},n.onload=function(){return t(!0)},n.src=e}else t(!1)}))}(t).then((function(t){!t&&e&&s("error")})),function(){e=!1}}),[t]),yy((function(){n&&!l.current?s("loading"):c&&s("normal")}),[t]);var u=function(){s("normal")};return[function(e){l.current=!1,"loading"===a&&null!=e&&e.complete&&(e.naturalWidth||e.naturalHeight)&&(l.current=!0,u())},c&&i?{src:i}:{onLoad:u,src:t},a]}const xy=window.React.useEffect,Cy=window.React.useRef,_y=window.React.useState;function Sy(e,t){var n=e.x-t.x,i=e.y-t.y;return Math.hypot(n,i)}var ky=["fallback","src","imgRef"],Ey=["prefixCls","src","alt","imageInfo","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"];const $y=window.React,My=window.React.useContext,Ry=window.React.useEffect,Ay=window.React.useRef,Oy=window.React.useState;var jy=function(e){var t=e.fallback,n=e.src,o=e.imgRef,r=k(e,ky),a=wy({src:n,fallback:t}),s=x(a,2),l=s[0],c=s[1];return $y.createElement("img",i({ref:function(e){o.current=e,l(e)}},r,c))},Ty=function(e){var t=e.prefixCls,n=e.src,o=e.alt,r=e.imageInfo,a=e.fallback,s=e.movable,c=void 0===s||s,u=e.onClose,d=e.visible,h=e.icons,p=void 0===h?{}:h,m=e.rootClassName,f=e.closeIcon,g=e.getContainer,y=e.current,v=void 0===y?0:y,b=e.count,w=void 0===b?1:b,C=e.countRender,S=e.scaleStep,$=void 0===S?.5:S,M=e.minScale,R=void 0===M?1:M,A=e.maxScale,O=void 0===A?50:A,j=e.transitionName,T=void 0===j?"zoom":j,N=e.maskTransitionName,L=void 0===N?"fade":N,I=e.imageRender,D=e.imgCommonProps,H=e.toolbarRender,P=e.onTransform,z=e.onChange,F=k(e,Ey),V=Ay(),B=My(ry),W=B&&w>1,U=B&&w>=1,Y=Oy(!0),Z=x(Y,2),G=Z[0],q=Z[1],K=function(e,t,n,i){var o=cy(null),r=cy([]),a=uy(dy),s=x(a,2),l=s[0],c=s[1],u=function(e,t){null===o.current&&(r.current=[],o.current=we((function(){c((function(e){var n=e;return r.current.forEach((function(e){n=E(E({},n),e)})),o.current=null,null==i||i({transform:n,action:t}),n}))}))),r.current.push(E(E({},l),e))};return{transform:l,resetTransform:function(e){c(dy),Ze(dy,l)||null==i||i({transform:dy,action:e})},updateTransform:u,dispatchZoomChange:function(i,o,r,a,s){var c=e.current,d=c.width,h=c.height,p=c.offsetWidth,m=c.offsetHeight,f=c.offsetLeft,g=c.offsetTop,y=i,v=l.scale*i;v>n?(v=n,y=n/l.scale):v0&&(o=1/o),a(o,"wheel",e.clientX,e.clientY)}}}}(V,c,d,$,Q,J,ee),ne=te.isMoving,ie=te.onMouseDown,oe=te.onWheel,re=function(e,t,n,i,o,r,a){var s=o.rotate,l=o.scale,c=o.x,u=o.y,d=_y(!1),h=x(d,2),p=h[0],m=h[1],f=Cy({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),g=function(e){f.current=E(E({},f.current),e)};return xy((function(){var e;return n&&t&&(e=tn(window,"touchmove",(function(e){return e.preventDefault()}),{passive:!1})),function(){var t;null===(t=e)||void 0===t||t.remove()}}),[n,t]),{isTouching:p,onTouchStart:function(e){if(t){e.stopPropagation(),m(!0);var n=e.touches,i=void 0===n?[]:n;i.length>1?g({point1:{x:i[0].clientX,y:i[0].clientY},point2:{x:i[1].clientX,y:i[1].clientY},eventType:"touchZoom"}):g({point1:{x:i[0].clientX-c,y:i[0].clientY-u},eventType:"move"})}},onTouchMove:function(e){var t=e.touches,n=void 0===t?[]:t,i=f.current,o=i.point1,s=i.point2,l=i.eventType;if(n.length>1&&"touchZoom"===l){var c={x:n[0].clientX,y:n[0].clientY},u={x:n[1].clientX,y:n[1].clientY},d=function(e,t,n,i){var o=Sy(e,n),r=Sy(t,i);if(0===o&&0===r)return[e.x,e.y];var a=o/(o+r);return[e.x+a*(t.x-e.x),e.y+a*(t.y-e.y)]}(o,s,c,u),h=x(d,2),p=h[0],m=h[1],y=Sy(c,u)/Sy(o,s);a(y,"touchZoom",p,m,!0),g({point1:c,point2:u,eventType:"touchZoom"})}else"move"===l&&(r({x:n[0].clientX-o.x,y:n[0].clientY-o.y},"move"),g({eventType:"move"}))},onTouchEnd:function(){if(n){if(p&&m(!1),g({eventType:"none"}),i>l)return r({x:0,y:0,scale:i},"touchZoom");var t=e.current.offsetWidth*l,o=e.current.offsetHeight*l,a=e.current.getBoundingClientRect(),c=a.left,u=a.top,d=s%180!=0,h=py(d?o:t,d?t:o,c,u);h&&r(E({},h),"dragRebound")}}}}(V,c,d,R,Q,J,ee),ae=re.isTouching,se=re.onTouchStart,le=re.onTouchMove,ce=re.onTouchEnd,ue=Q.rotate,de=Q.scale,he=l(_({},"".concat(t,"-moving"),ne));Ry((function(){G||q(!0)}),[G]);var pe=function(e){var t=v+e;!Number.isInteger(t)||t<0||t>w-1||(q(!1),X(e<0?"prev":"next"),null==z||z(t,v))},me=function(e){d&&W&&(e.keyCode===xt.LEFT?pe(-1):e.keyCode===xt.RIGHT&&pe(1))};Ry((function(){var e=tn(window,"keydown",me,!1);return function(){e.remove()}}),[d,W,v]);var fe=$y.createElement(jy,i({},D,{width:e.width,height:e.height,imgRef:V,className:"".concat(t,"-img"),alt:o,style:{transform:"translate3d(".concat(Q.x,"px, ").concat(Q.y,"px, 0) scale3d(").concat(Q.flipX?"-":"").concat(de,", ").concat(Q.flipY?"-":"").concat(de,", 1) rotate(").concat(ue,"deg)"),transitionDuration:(!G||ae)&&"0s"},fallback:a,src:n,onWheel:oe,onMouseDown:ie,onDoubleClick:function(e){d&&(1!==de?J({x:0,y:0,scale:1},"doubleClick"):ee(1+$,"doubleClick",e.clientX,e.clientY))},onTouchStart:se,onTouchMove:le,onTouchEnd:ce,onTouchCancel:ce})),ge=E({url:n,alt:o},r);return $y.createElement($y.Fragment,null,$y.createElement(po,i({transitionName:T,maskTransitionName:L,closable:!1,keyboard:!0,prefixCls:t,onClose:u,visible:d,classNames:{wrapper:he},rootClassName:m,getContainer:g},F,{afterClose:function(){X("close")}}),$y.createElement("div",{className:"".concat(t,"-img-wrapper")},I?I(fe,E({transform:Q,image:ge},B?{current:v}:{})):fe)),$y.createElement(ly,{visible:d,transform:Q,maskTransitionName:L,closeIcon:f,getContainer:g,prefixCls:t,rootClassName:m,icons:p,countRender:C,showSwitch:W,showProgress:U,current:v,count:w,scale:de,minScale:R,maxScale:O,toolbarRender:H,onActive:pe,onZoomIn:function(){ee(1+$,"zoomIn")},onZoomOut:function(){ee(1/(1+$),"zoomOut")},onRotateRight:function(){J({rotate:ue+90},"rotateRight")},onRotateLeft:function(){J({rotate:ue-90},"rotateLeft")},onFlipX:function(){J({flipX:!Q.flipX},"flipX")},onFlipY:function(){J({flipY:!Q.flipY},"flipY")},onClose:u,onReset:function(){X("reset")},zIndex:void 0!==F.zIndex?F.zIndex+1:void 0,image:ge}))},Ny=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];const Ly=window.React;var Iy=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],Dy=["src"];const Hy=window.React,Py=window.React.useState,zy=window.React;var Fy=0,Vy=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],By=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"];const Wy=window.React,Uy=window.React.useContext,Yy=window.React.useMemo,Zy=window.React.useState;var Gy=function(e){var t=e.src,n=e.alt,o=e.onPreviewClose,r=e.prefixCls,a=void 0===r?"rc-image":r,s=e.previewPrefixCls,c=void 0===s?"".concat(a,"-preview"):s,u=e.placeholder,d=e.fallback,h=e.width,p=e.height,m=e.style,f=e.preview,g=void 0===f||f,y=e.className,v=e.onClick,b=e.onError,w=e.wrapperClassName,S=e.wrapperStyle,$=e.rootClassName,M=k(e,Vy),R=u&&!0!==u,A="object"===C(g)?g:{},O=A.src,j=A.visible,T=void 0===j?void 0:j,N=A.onVisibleChange,L=void 0===N?o:N,I=A.getContainer,D=void 0===I?void 0:I,H=A.mask,P=A.maskClassName,z=A.movable,F=A.icons,V=A.scaleStep,B=A.minScale,W=A.maxScale,U=A.imageRender,Y=A.toolbarRender,Z=k(A,By),G=null!=O?O:t,q=de(!!T,{value:T,onChange:L}),K=x(q,2),Q=K[0],X=K[1],J=wy({src:t,isCustomPlaceholder:R,fallback:d}),ee=x(J,3),te=ee[0],ne=ee[1],ie=ee[2],oe=Zy(null),re=x(oe,2),ae=re[0],se=re[1],le=Uy(ry),ce=!!g,ue=l(a,w,$,_({},"".concat(a,"-error"),"error"===ie)),he=Yy((function(){var t={};return Ny.forEach((function(n){void 0!==e[n]&&(t[n]=e[n])})),t}),Ny.map((function(t){return e[t]}))),pe=function(e,t){var n=zy.useState((function(){return String(Fy+=1)})),i=x(n,1)[0],o=zy.useContext(ry),r={data:t,canPreview:e};return zy.useEffect((function(){if(o)return o.register(i,r)}),[]),zy.useEffect((function(){o&&o.register(i,r)}),[e,t]),i}(ce,Yy((function(){return E(E({},he),{},{src:G})}),[G,he]));return Wy.createElement(Wy.Fragment,null,Wy.createElement("div",i({},M,{className:ue,onClick:ce?function(e){var t,n,i=(t=e.target.getBoundingClientRect(),n=document.documentElement,{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}),o=i.left,r=i.top;le?le.onPreview(pe,G,o,r):(se({x:o,y:r}),X(!0)),null==v||v(e)}:v,style:E({width:h,height:p},S)}),Wy.createElement("img",i({},he,{className:l("".concat(a,"-img"),_({},"".concat(a,"-img-placeholder"),!0===u),y),style:E({height:p},m),ref:te},ne,{width:h,height:p,onError:b})),"loading"===ie&&Wy.createElement("div",{"aria-hidden":"true",className:"".concat(a,"-placeholder")},u),H&&ce&&Wy.createElement("div",{className:l("".concat(a,"-mask"),P),style:{display:"none"===(null==m?void 0:m.display)?"none":void 0}},H)),!le&&ce&&Wy.createElement(Ty,i({"aria-hidden":!Q,visible:Q,prefixCls:c,onClose:function(){X(!1),se(null)},mousePosition:ae,src:G,alt:n,imageInfo:{width:h,height:p},fallback:d,getContainer:D,icons:F,movable:z,scaleStep:V,minScale:B,maxScale:W,rootClassName:$,imageRender:U,imgCommonProps:he,toolbarRender:Y},Z)))};Gy.PreviewGroup=function(e){var t,n=e.previewPrefixCls,o=void 0===n?"rc-image-preview":n,r=e.children,a=e.icons,s=void 0===a?{}:a,l=e.items,c=e.preview,u=e.fallback,d="object"===C(c)?c:{},h=d.visible,p=d.onVisibleChange,m=d.getContainer,f=d.current,g=d.movable,y=d.minScale,v=d.maxScale,b=d.countRender,w=d.closeIcon,S=d.onChange,M=d.onTransform,R=d.toolbarRender,A=d.imageRender,O=k(d,Iy),j=function(e){var t=Ly.useState({}),n=x(t,2),i=n[0],o=n[1],r=Ly.useCallback((function(e,t){return o((function(n){return E(E({},n),{},_({},e,t))})),function(){o((function(t){var n=E({},t);return delete n[e],n}))}}),[]);return[Ly.useMemo((function(){return e?e.map((function(e){if("string"==typeof e)return{data:{src:e}};var t={};return Object.keys(e).forEach((function(n){["src"].concat($(Ny)).includes(n)&&(t[n]=e[n])})),{data:t}})):Object.keys(i).reduce((function(e,t){var n=i[t],o=n.canPreview,r=n.data;return o&&e.push({data:r,id:t}),e}),[])}),[e,i]),r,!!e]}(l),T=x(j,3),N=T[0],L=T[1],I=T[2],D=de(0,{value:f}),H=x(D,2),P=H[0],z=H[1],F=Py(!1),V=x(F,2),B=V[0],W=V[1],U=(null===(t=N[P])||void 0===t?void 0:t.data)||{},Y=U.src,Z=k(U,Dy),G=de(!!h,{value:h,onChange:function(e,t){null==p||p(e,t,P)}}),q=x(G,2),K=q[0],Q=q[1],X=Py(null),J=x(X,2),ee=J[0],te=J[1],ne=Hy.useCallback((function(e,t,n,i){var o=I?N.findIndex((function(e){return e.data.src===t})):N.findIndex((function(t){return t.id===e}));z(o<0?0:o),Q(!0),te({x:n,y:i}),W(!0)}),[N,I]);Hy.useEffect((function(){K?B||z(0):W(!1)}),[K]);var ie=Hy.useMemo((function(){return{register:L,onPreview:ne}}),[L,ne]);return Hy.createElement(ry.Provider,{value:ie},r,Hy.createElement(Ty,i({"aria-hidden":!K,movable:g,visible:K,prefixCls:o,closeIcon:w,onClose:function(){Q(!1),te(null)},mousePosition:ee,imgCommonProps:Z,src:Y,fallback:u,icons:s,minScale:y,maxScale:v,getContainer:m,current:P,count:N.length,countRender:b,onTransform:M,toolbarRender:R,imageRender:A,onChange:function(e,t){z(e),null==S||S(e,t)}},O)))};const qy={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"},Ky=window.React;var Qy=function(e,t){return Ky.createElement(n,i({},e,{ref:t,icon:qy}))};const Xy=Ky.forwardRef(Qy),Jy={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"},ev=window.React;var tv=function(e,t){return ev.createElement(n,i({},e,{ref:t,icon:Jy}))};const nv=ev.forwardRef(tv),iv={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"},ov=window.React;var rv=function(e,t){return ov.createElement(n,i({},e,{ref:t,icon:iv}))};const av=ov.forwardRef(rv),sv={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"},lv=window.React;var cv=function(e,t){return lv.createElement(n,i({},e,{ref:t,icon:sv}))};const uv=lv.forwardRef(cv),dv={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"},hv=window.React;var pv=function(e,t){return hv.createElement(n,i({},e,{ref:t,icon:dv}))};const mv=hv.forwardRef(pv),fv=e=>({position:e||"absolute",inset:0}),gv=e=>{const{iconCls:t,motionDurationSlow:n,paddingXXS:i,marginXXS:o,prefixCls:r,colorTextLightSolid:s}=e;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:s,background:new Ee("#000").setA(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${n}`,[`.${r}-mask-info`]:Object.assign(Object.assign({},je),{padding:`0 ${a(i)}`,[t]:{marginInlineEnd:o,svg:{verticalAlign:"baseline"}}})}},yv=e=>{const{previewCls:t,modalMaskBg:n,paddingSM:i,marginXL:o,margin:r,paddingLG:s,previewOperationColorDisabled:l,previewOperationHoverColor:c,motionDurationSlow:u,iconCls:d,colorTextLightSolid:h}=e,p=new Ee(n).setA(.1),m=p.clone().setA(.2);return{[`${t}-footer`]:{position:"fixed",bottom:o,left:{_skip_check_:!0,value:"50%"},display:"flex",flexDirection:"column",alignItems:"center",color:e.previewOperationColor,transform:"translateX(-50%)"},[`${t}-progress`]:{marginBottom:r},[`${t}-close`]:{position:"fixed",top:o,right:{_skip_check_:!0,value:o},display:"flex",color:h,backgroundColor:p.toRgbString(),borderRadius:"50%",padding:i,outline:0,border:0,cursor:"pointer",transition:`all ${u}`,"&:hover":{backgroundColor:m.toRgbString()},[`& > ${d}`]:{fontSize:e.previewOperationSize}},[`${t}-operations`]:{display:"flex",alignItems:"center",padding:`0 ${a(s)}`,backgroundColor:p.toRgbString(),borderRadius:100,"&-operation":{marginInlineStart:i,padding:i,cursor:"pointer",transition:`all ${u}`,userSelect:"none",[`&:not(${t}-operations-operation-disabled):hover > ${d}`]:{color:c},"&-disabled":{color:l,cursor:"not-allowed"},"&:first-of-type":{marginInlineStart:0},[`& > ${d}`]:{fontSize:e.previewOperationSize}}}}},vv=e=>{const{modalMaskBg:t,iconCls:n,previewOperationColorDisabled:i,previewCls:o,zIndexPopup:r,motionDurationSlow:a}=e,s=new Ee(t).setA(.1),l=s.clone().setA(.2);return{[`${o}-switch-left, ${o}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:e.calc(r).add(1).equal(),display:"flex",alignItems:"center",justifyContent:"center",width:e.imagePreviewSwitchSize,height:e.imagePreviewSwitchSize,marginTop:e.calc(e.imagePreviewSwitchSize).mul(-1).div(2).equal(),color:e.previewOperationColor,background:s.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${a}`,userSelect:"none","&:hover":{background:l.toRgbString()},"&-disabled":{"&, &:hover":{color:i,background:"transparent",cursor:"not-allowed",[`> ${n}`]:{cursor:"not-allowed"}}},[`> ${n}`]:{fontSize:e.previewOperationSize}},[`${o}-switch-left`]:{insetInlineStart:e.marginSM},[`${o}-switch-right`]:{insetInlineEnd:e.marginSM}}},bv=e=>{const{motionEaseOut:t,previewCls:n,motionDurationSlow:i,componentCls:o}=e;return[{[`${o}-preview-root`]:{[n]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${n}-body`]:Object.assign(Object.assign({},fv()),{overflow:"hidden"}),[`${n}-img`]:{maxWidth:"100%",maxHeight:"70%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${i} ${t} 0s`,userSelect:"none","&-wrapper":Object.assign(Object.assign({},fv()),{transition:`transform ${i} ${t} 0s`,display:"flex",justifyContent:"center",alignItems:"center","& > *":{pointerEvents:"auto"},"&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${n}-moving`]:{[`${n}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${o}-preview-root`]:{[`${n}-wrap`]:{zIndex:e.zIndexPopup}}},{[`${o}-preview-operations-wrapper`]:{position:"fixed",zIndex:e.calc(e.zIndexPopup).add(1).equal()},"&":[yv(e),vv(e)]}]},wv=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",display:"inline-block",[`${t}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${t}-img-placeholder`]:{backgroundColor:e.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${t}-mask`]:Object.assign({},gv(e)),[`${t}-mask:hover`]:{opacity:1},[`${t}-placeholder`]:Object.assign({},fv())}}},xv=e=>{const{previewCls:t}=e;return{[`${t}-root`]:G(e,"zoom"),"&":Z(e,!0)}},Cv=o("Image",(e=>{const t=`${e.componentCls}-preview`,n=R(e,{previewCls:t,modalMaskBg:new Ee("#000").setA(.45).toRgbString(),imagePreviewSwitchSize:e.controlHeightLG});return[wv(n),bv(n),sr(R(n,{componentCls:t})),xv(n)]}),(e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new Ee(e.colorTextLightSolid).setA(.65).toRgbString(),previewOperationHoverColor:new Ee(e.colorTextLightSolid).setA(.85).toRgbString(),previewOperationColorDisabled:new Ee(e.colorTextLightSolid).setA(.25).toRgbString(),previewOperationSize:1.5*e.fontSizeIcon})));var _v=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{prefixCls:t,preview:n,className:i,rootClassName:o,style:r}=e,a=Ev(e,["prefixCls","preview","className","rootClassName","style"]),{getPrefixCls:c,getPopupContainer:u,className:d,style:h,preview:p}=s("image"),[m]=F("Image"),f=c("image",t),g=c(),y=T(f),[v,b,w]=Cv(f,y),x=l(o,b,w,y),C=l(i,b,d),[_]=Q("ImagePreview","object"==typeof n?n.zIndex:void 0),S=$v.useMemo((()=>{if(!1===n)return n;const e="object"==typeof n?n:{},{getContainer:t,closeIcon:i,rootClassName:o,destroyOnClose:r,destroyOnHidden:a}=e,s=Ev(e,["getContainer","closeIcon","rootClassName","destroyOnClose","destroyOnHidden"]);return Object.assign(Object.assign({mask:$v.createElement("div",{className:`${f}-mask-info`},$v.createElement(iy,null),null==m?void 0:m.preview),icons:kv},s),{destroyOnClose:null!=a?a:r,rootClassName:l(x,o),getContainer:null!=t?t:u,transitionName:ee(g,"zoom",e.transitionName),maskTransitionName:ee(g,"fade",e.maskTransitionName),zIndex:_,closeIcon:null!=i?i:null==p?void 0:p.closeIcon})}),[n,m,null==p?void 0:p.closeIcon]),k=Object.assign(Object.assign({},h),r);return v($v.createElement(Gy,Object.assign({prefixCls:f,preview:S,rootClassName:x,className:C,style:k},a)))};Mv.PreviewGroup=e=>{var{previewPrefixCls:t,preview:n}=e,i=_v(e,["previewPrefixCls","preview"]);const{getPrefixCls:o,direction:r}=Sv.useContext(j),a=o("image",t),s=`${a}-preview`,c=o(),u=T(a),[d,h,p]=Cv(a,u),[m]=Q("ImagePreview","object"==typeof n?n.zIndex:void 0),f=Sv.useMemo((()=>Object.assign(Object.assign({},kv),{left:"rtl"===r?Sv.createElement(on,null):Sv.createElement(nn,null),right:"rtl"===r?Sv.createElement(nn,null):Sv.createElement(on,null)})),[r]),g=Sv.useMemo((()=>{var e;if(!1===n)return n;const t="object"==typeof n?n:{},i=l(h,p,u,null!==(e=t.rootClassName)&&void 0!==e?e:"");return Object.assign(Object.assign({},t),{transitionName:ee(c,"zoom",t.transitionName),maskTransitionName:ee(c,"fade",t.maskTransitionName),rootClassName:i,zIndex:m})}),[n]);return d(Sv.createElement(Gy.PreviewGroup,Object.assign({preview:g,previewPrefixCls:s,icons:f},i)))};const Rv=Mv,Av=window.React,Ov=window.React.useContext,jv=window.React.useMemo,Tv=o(["Input","OTP"],(e=>(e=>{const{componentCls:t,paddingXS:n}=e;return{[t]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:n,[`${t}-input-wrapper`]:{position:"relative",[`${t}-mask-icon`]:{position:"absolute",zIndex:"1",top:"50%",right:"50%",transform:"translate(50%, -50%)",pointerEvents:"none"},[`${t}-mask-input`]:{color:"transparent",caretColor:e.colorText},[`${t}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":"none",margin:0},[`${t}-mask-input[type=number]`]:{"-moz-appearance":"textfield"}},"&-rtl":{direction:"rtl"},[`${t}-input`]:{textAlign:"center",paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}})(R(e,Lt(e)))),At);var Nv=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{className:n,value:i,onChange:o,onActiveChange:r,index:a,mask:s}=e,c=Nv(e,["className","value","onChange","onActiveChange","index","mask"]),{getPrefixCls:u}=Lv.useContext(j),d=u("otp"),h="string"==typeof s?s:i,p=Lv.useRef(null);Lv.useImperativeHandle(t,(()=>p.current));const m=()=>{we((()=>{var e;const t=null===(e=p.current)||void 0===e?void 0:e.input;document.activeElement===t&&t&&t.select()}))};return Lv.createElement("span",{className:`${d}-input-wrapper`,role:"presentation"},s&&""!==i&&void 0!==i&&Lv.createElement("span",{className:`${d}-mask-icon`,"aria-hidden":"true"},h),Lv.createElement(Kt,Object.assign({"aria-label":`OTP Input ${a+1}`,type:!0===s?"password":"text"},c,{ref:p,value:i,onInput:e=>{o(a,e.target.value)},onFocus:m,onKeyDown:e=>{const{key:t,ctrlKey:n,metaKey:o}=e;"ArrowLeft"===t?r(a-1):"ArrowRight"===t?r(a+1):"z"===t&&(n||o)?e.preventDefault():"Backspace"!==t||i||r(a-1),m()},onMouseDown:m,onMouseUp:m,className:l(n,{[`${d}-mask-input`]:s})})))}));var Dv=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{index:t,prefixCls:n,separator:i}=e,o="function"==typeof i?i(t):i;return o?Hv.createElement("span",{className:`${n}-separator`},o):null},Fv=Hv.forwardRef(((e,t)=>{const{prefixCls:n,length:i=6,size:o,defaultValue:r,value:a,onChange:s,formatter:c,separator:u,variant:d,disabled:h,status:p,autoFocus:m,mask:f,type:g,onInput:y,inputMode:v}=e,b=Dv(e,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:w,direction:x}=Hv.useContext(j),C=w("otp",n),_=bt(b,{aria:!0,data:!0,attr:!0}),[S,k,E]=Tv(C),R=De((e=>null!=o?o:e)),A=Hv.useContext(Ve),O=qt(A.status,p),T=Hv.useMemo((()=>Object.assign(Object.assign({},A),{status:O,hasFeedback:!1,feedbackIcon:null})),[A,O]),N=Hv.useRef(null),L=Hv.useRef({});Hv.useImperativeHandle(t,(()=>({focus:()=>{var e;null===(e=L.current[0])||void 0===e||e.focus()},blur:()=>{var e;for(let t=0;tc?c(e):e,[D,H]=Hv.useState((()=>Pv(I(r||""))));Hv.useEffect((()=>{void 0!==a&&H(Pv(a))}),[a]);const P=M((e=>{H(e),y&&y(e),s&&e.length===i&&e.every((e=>e))&&e.some(((e,t)=>D[t]!==e))&&s(e.join(""))})),z=M(((e,t)=>{let n=$(D);for(let i=0;i=0&&!n[i];i-=1)n.pop();const o=I(n.map((e=>e||" ")).join(""));return n=Pv(o).map(((e,t)=>" "!==e||n[t]?e:n[t])),n})),F=(e,t)=>{var n;const o=z(e,t),r=Math.min(e+t.length,i-1);r!==e&&void 0!==o[e]&&(null===(n=L.current[r])||void 0===n||n.focus()),P(o)},V=e=>{var t;null===(t=L.current[e])||void 0===t||t.focus()},B={variant:d,disabled:h,status:O,mask:f,type:g,inputMode:v};return S(Hv.createElement("div",Object.assign({},_,{ref:N,className:l(C,{[`${C}-sm`]:"small"===R,[`${C}-lg`]:"large"===R,[`${C}-rtl`]:"rtl"===x},E,k),role:"group"}),Hv.createElement(Ve.Provider,{value:T},Array.from({length:i}).map(((e,t)=>{const n=`otp-${t}`,o=D[t]||"";return Hv.createElement(Hv.Fragment,{key:n},Hv.createElement(Iv,Object.assign({ref:e=>{L.current[t]=e},index:t,size:R,htmlSize:1,className:`${C}-input`,onChange:F,value:o,onActiveChange:V,autoFocus:0===t&&m},B)),te?Zv.createElement(iy,null):Zv.createElement(Uv,null),Qv={click:"onClick",hover:"onMouseOver"},Xv=Zv.forwardRef(((e,t)=>{const{disabled:n,action:i="click",visibilityToggle:o=!0,iconRender:r=Kv,suffix:a}=e,s=Zv.useContext(Be),c=null!=n?n:s,d="object"==typeof o&&void 0!==o.visible,[h,p]=qv((()=>!!d&&o.visible)),m=Gv(null);Zv.useEffect((()=>{d&&p(o.visible)}),[d,o]);const f=an(m),g=()=>{var e;if(c)return;h&&f();const t=!h;p(t),"object"==typeof o&&(null===(e=o.onVisibleChange)||void 0===e||e.call(o,t))},{className:y,prefixCls:v,inputPrefixCls:b,size:w}=e,x=Yv(e,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:C}=Zv.useContext(j),_=C("input",b),S=C("input-password",v),k=o&&(e=>{const t=Qv[i]||"",n=r(h),o={[t]:g,className:`${e}-icon`,key:"passwordIcon",onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.preventDefault()}};return Zv.cloneElement(Zv.isValidElement(n)?n:Zv.createElement("span",null,n),o)})(S),E=l(S,y,{[`${S}-${w}`]:!!w}),$=Object.assign(Object.assign({},W(x,["suffix","iconRender","visibilityToggle"])),{type:h?"text":"password",className:E,prefixCls:_,suffix:Zv.createElement(Zv.Fragment,null,k,a)});return w&&($.size=w),Zv.createElement(Kt,Object.assign({ref:u(t,m)},$))}));var Jv=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{prefixCls:n,inputPrefixCls:i,className:o,size:r,suffix:a,enterButton:s=!1,addonAfter:c,loading:d,disabled:h,onSearch:p,onChange:m,onCompositionStart:f,onCompositionEnd:g,variant:y,onPressEnter:v}=e,b=Jv(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd","variant","onPressEnter"]),{getPrefixCls:w,direction:x}=eb.useContext(j),C=eb.useRef(!1),_=w("input-search",n),S=w("input",i),{compactSize:k}=Fe(_,x),E=De((e=>{var t;return null!==(t=null!=r?r:k)&&void 0!==t?t:e})),$=eb.useRef(null),M=e=>{var t;document.activeElement===(null===(t=$.current)||void 0===t?void 0:t.input)&&e.preventDefault()},R=e=>{var t,n;p&&p(null===(n=null===(t=$.current)||void 0===t?void 0:t.input)||void 0===n?void 0:n.value,e,{source:"input"})},A="boolean"==typeof s?eb.createElement(sn,null):null,O=`${_}-button`;let T;const N=s||{},L=N.type&&!0===N.type.__ANT_BUTTON;T=L||"button"===N.type?pe(N,Object.assign({onMouseDown:M,onClick:e=>{var t,n;null===(n=null===(t=null==N?void 0:N.props)||void 0===t?void 0:t.onClick)||void 0===n||n.call(t,e),R(e)},key:"enterButton"},L?{className:O,size:E}:{})):eb.createElement(Ct,{className:O,color:s?"primary":"default",size:E,disabled:h,key:"enterButton",onMouseDown:M,onClick:R,loading:d,icon:A,variant:"borderless"===y||"filled"===y||"underlined"===y?"text":s?"solid":void 0},s),c&&(T=[T,pe(c,{key:"addonAfter"})]);const I=l(_,{[`${_}-rtl`]:"rtl"===x,[`${_}-${E}`]:!!E,[`${_}-with-button`]:!!s},o),D=Object.assign(Object.assign({},b),{className:I,prefixCls:S,type:"search",size:E,variant:y,onPressEnter:e=>{C.current||d||(null==v||v(e),R(e))},onCompositionStart:e=>{C.current=!0,null==f||f(e)},onCompositionEnd:e=>{C.current=!1,null==g||g(e)},addonAfter:T,suffix:a,onChange:e=>{(null==e?void 0:e.target)&&"click"===e.type&&p&&p(e.target.value,e,{source:"clear"}),null==m||m(e)},disabled:h});return eb.createElement(Kt,Object.assign({ref:u($,t)},D))}));var nb,ib=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],ob={};var rb=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"];const ab=window.React;var sb=ab.forwardRef((function(e,t){var n=e,o=n.prefixCls,r=n.defaultValue,a=n.value,s=n.autoSize,c=n.onResize,u=n.className,d=n.style,h=n.disabled,p=n.onChange;n.onInternalAutoSize;var m=k(n,rb),f=de(r,{value:a,postState:function(e){return null!=e?e:""}}),g=x(f,2),y=g[0],v=g[1],b=ab.useRef();ab.useImperativeHandle(t,(function(){return{textArea:b.current}}));var w=ab.useMemo((function(){return s&&"object"===C(s)?[s.minRows,s.maxRows]:[]}),[s]),S=x(w,2),$=S[0],M=S[1],R=!!s,A=ab.useState(2),O=x(A,2),j=O[0],T=O[1],N=ab.useState(),L=x(N,2),I=L[0],D=L[1],H=function(){T(0)};_e((function(){R&&H()}),[a,$,M,R]),_e((function(){if(0===j)T(1);else if(1===j){var e=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;nb||((nb=document.createElement("textarea")).setAttribute("tab-index","-1"),nb.setAttribute("aria-hidden","true"),nb.setAttribute("name","hiddenTextarea"),document.body.appendChild(nb)),e.getAttribute("wrap")?nb.setAttribute("wrap",e.getAttribute("wrap")):nb.removeAttribute("wrap");var o=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&ob[n])return ob[n];var i=window.getComputedStyle(e),o=i.getPropertyValue("box-sizing")||i.getPropertyValue("-moz-box-sizing")||i.getPropertyValue("-webkit-box-sizing"),r=parseFloat(i.getPropertyValue("padding-bottom"))+parseFloat(i.getPropertyValue("padding-top")),a=parseFloat(i.getPropertyValue("border-bottom-width"))+parseFloat(i.getPropertyValue("border-top-width")),s={sizingStyle:ib.map((function(e){return"".concat(e,":").concat(i.getPropertyValue(e))})).join(";"),paddingSize:r,borderSize:a,boxSizing:o};return t&&n&&(ob[n]=s),s}(e,t),r=o.paddingSize,a=o.borderSize,s=o.boxSizing,l=o.sizingStyle;nb.setAttribute("style","".concat(l,";").concat("\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important;\n pointer-events: none !important;\n")),nb.value=e.value||e.placeholder||"";var c,u=void 0,d=void 0,h=nb.scrollHeight;if("border-box"===s?h+=a:"content-box"===s&&(h-=r),null!==n||null!==i){nb.value=" ";var p=nb.scrollHeight-r;null!==n&&(u=p*n,"border-box"===s&&(u=u+r+a),h=Math.max(u,h)),null!==i&&(d=p*i,"border-box"===s&&(d=d+r+a),c=h>d?"":"hidden",h=Math.min(d,h))}var m={height:h,overflowY:c,resize:"none"};return u&&(m.minHeight=u),d&&(m.maxHeight=d),m}(b.current,!1,$,M);T(2),D(e)}}),[j]);var P=ab.useRef(),z=function(){we.cancel(P.current)};ab.useEffect((function(){return z}),[]);var F=R?I:null,V=E(E({},d),F);return 0!==j&&1!==j||(V.overflowY="hidden",V.overflowX="hidden"),ab.createElement(ke,{onResize:function(e){2===j&&(null==c||c(e),s&&(z(),P.current=we((function(){H()}))))},disabled:!(s||c)},ab.createElement("textarea",i({},m,{ref:b,style:V,className:l(o,u,_({},"".concat(o,"-disabled"),h)),disabled:h,value:y,onChange:function(e){v(e.target.value),null==p||p(e)}})))})),lb=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"];const cb=window.React,ub=window.React.useEffect,db=window.React.useImperativeHandle,hb=window.React.useRef;var pb=cb.forwardRef((function(e,t){var n,o=e.defaultValue,r=e.value,a=e.onFocus,s=e.onBlur,c=e.onChange,u=e.allowClear,d=e.maxLength,h=e.onCompositionStart,p=e.onCompositionEnd,m=e.suffix,f=e.prefixCls,g=void 0===f?"rc-textarea":f,y=e.showCount,v=e.count,b=e.className,w=e.style,C=e.disabled,S=e.hidden,M=e.classNames,R=e.styles,A=e.onResize,O=e.onClear,j=e.onPressEnter,T=e.readOnly,N=e.autoSize,L=e.onKeyDown,I=k(e,lb),D=de(o,{value:r,defaultValue:o}),H=x(D,2),P=H[0],z=H[1],F=null==P?"":String(P),V=cb.useState(!1),B=x(V,2),W=B[0],U=B[1],Y=cb.useRef(!1),Z=cb.useState(null),G=x(Z,2),q=G[0],K=G[1],Q=hb(null),X=hb(null),J=function(){var e;return null===(e=X.current)||void 0===e?void 0:e.textArea},ee=function(){J().focus()};db(t,(function(){var e;return{resizableTextArea:X.current,focus:ee,blur:function(){J().blur()},nativeElement:(null===(e=Q.current)||void 0===e?void 0:e.nativeElement)||J()}})),ub((function(){U((function(e){return!C&&e}))}),[C]);var te=cb.useState(null),ne=x(te,2),ie=ne[0],oe=ne[1];cb.useEffect((function(){var e;ie&&(e=J()).setSelectionRange.apply(e,$(ie))}),[ie]);var re,ae=ln(v,y),se=null!==(n=ae.max)&&void 0!==n?n:d,le=Number(se)>0,ce=ae.strategy(F),ue=!!se&&ce>se,he=function(e,t){var n=t;!Y.current&&ae.exceedFormatter&&ae.max&&ae.strategy(t)>ae.max&&t!==(n=ae.exceedFormatter(t,{max:ae.max}))&&oe([J().selectionStart||0,J().selectionEnd||0]),z(n),cn(e.currentTarget,e,c,n)},pe=m;ae.show&&(re=ae.showFormatter?ae.showFormatter({value:F,count:ce,maxLength:se}):"".concat(ce).concat(le?" / ".concat(se):""),pe=cb.createElement(cb.Fragment,null,pe,cb.createElement("span",{className:l("".concat(g,"-data-count"),null==M?void 0:M.count),style:null==R?void 0:R.count},re)));var me=!N&&!y&&!u;return cb.createElement(Vt,{ref:Q,value:F,allowClear:u,handleReset:function(e){z(""),ee(),cn(J(),e,c)},suffix:pe,prefixCls:g,classNames:E(E({},M),{},{affixWrapper:l(null==M?void 0:M.affixWrapper,_(_({},"".concat(g,"-show-count"),y),"".concat(g,"-textarea-allow-clear"),u))}),disabled:C,focused:W,className:l(b,ue&&"".concat(g,"-out-of-range")),style:E(E({},w),q&&!me?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":"string"==typeof re?re:void 0}},hidden:S,readOnly:T,onClear:O},cb.createElement(sb,i({},I,{autoSize:N,maxLength:d,onKeyDown:function(e){"Enter"===e.key&&j&&j(e),null==L||L(e)},onChange:function(e){he(e,e.target.value)},onFocus:function(e){U(!0),null==a||a(e)},onBlur:function(e){U(!1),null==s||s(e)},onCompositionStart:function(e){Y.current=!0,null==h||h(e)},onCompositionEnd:function(e){Y.current=!1,he(e,e.currentTarget.value),null==p||p(e)},className:l(null==M?void 0:M.textarea),style:E(E({},null==R?void 0:R.textarea),{},{resize:null==w?void 0:w.resize}),disabled:C,prefixCls:g,onResize:function(e){var t;null==A||A(e),null!==(t=J())&&void 0!==t&&t.style.height&&K(!0)},ref:X,readOnly:T})))}));const mb=o(["Input","TextArea"],(e=>(e=>{const{componentCls:t,paddingLG:n}=e,i=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical",[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[i]:{position:"relative","&-show-count":{[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`\n &-allow-clear > ${t},\n &-affix-wrapper${i}-has-feedback ${t}\n `]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${i}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}})(R(e,Lt(e)))),At,{resetFont:!1});var fb=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{var n;const{prefixCls:i,bordered:o=!0,size:r,disabled:a,status:c,allowClear:u,classNames:d,rootClassName:h,className:p,style:m,styles:f,variant:g,showCount:y,onMouseDown:v,onResize:b}=e,w=fb(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:x,direction:C,allowClear:_,autoComplete:S,className:k,style:E,classNames:$,styles:M}=s("textArea"),R=gb.useContext(Be),A=null!=a?a:R,{status:O,hasFeedback:j,feedbackIcon:N}=gb.useContext(Ve),L=qt(O,c),I=gb.useRef(null);gb.useImperativeHandle(t,(()=>{var e;return{resizableTextArea:null===(e=I.current)||void 0===e?void 0:e.resizableTextArea,focus:e=>{var t,n;Bt(null===(n=null===(t=I.current)||void 0===t?void 0:t.resizableTextArea)||void 0===n?void 0:n.textArea,e)},blur:()=>{var e;return null===(e=I.current)||void 0===e?void 0:e.blur()}}}));const D=x("input",i),H=T(D),[P,z,F]=un(D,h),[V]=mb(D,H),{compactSize:B,compactItemClassnames:W}=Fe(D,C),U=De((e=>{var t;return null!==(t=null!=r?r:B)&&void 0!==t?t:e})),[Y,Z]=He("textArea",g,o),G=dn(null!=u?u:_),[q,K]=gb.useState(!1),[Q,X]=gb.useState(!1);return P(V(gb.createElement(pb,Object.assign({autoComplete:S},w,{style:Object.assign(Object.assign({},E),m),styles:Object.assign(Object.assign({},M),f),disabled:A,allowClear:G,className:l(F,H,p,h,W,k,Q&&`${D}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},d),$),{textarea:l({[`${D}-sm`]:"small"===U,[`${D}-lg`]:"large"===U},z,null==d?void 0:d.textarea,$.textarea,q&&`${D}-mouse-active`),variant:l({[`${D}-${Y}`]:Z},Gt(D,L)),affixWrapper:l(`${D}-textarea-affix-wrapper`,{[`${D}-affix-wrapper-rtl`]:"rtl"===C,[`${D}-affix-wrapper-sm`]:"small"===U,[`${D}-affix-wrapper-lg`]:"large"===U,[`${D}-textarea-show-count`]:y||(null===(n=e.count)||void 0===n?void 0:n.show)},z)}),prefixCls:D,suffix:j&&gb.createElement("span",{className:`${D}-textarea-suffix`},N),showCount:y,ref:I,onResize:e=>{var t,n;if(null==b||b(e),q&&"function"==typeof getComputedStyle){const e=null===(n=null===(t=I.current)||void 0===t?void 0:t.nativeElement)||void 0===n?void 0:n.querySelector("textarea");e&&"both"===getComputedStyle(e).resize&&X(!0)}},onMouseDown:e=>{K(!0),null==v||v(e);const t=()=>{K(!1),document.removeEventListener("mouseup",t)};document.addEventListener("mouseup",t)}}))))})),vb=Kt;vb.Group=e=>{const{getPrefixCls:t,direction:n}=Ov(j),{prefixCls:i,className:o}=e,r=t("input-group",i),a=t("input"),[s,c,u]=rn(a),d=l(r,u,{[`${r}-lg`]:"large"===e.size,[`${r}-sm`]:"small"===e.size,[`${r}-compact`]:e.compact,[`${r}-rtl`]:"rtl"===n},c,o),h=Ov(Ve),p=jv((()=>Object.assign(Object.assign({},h),{isFormItemInput:!1})),[h]);return s(Av.createElement("span",{className:d,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},Av.createElement(Ve.Provider,{value:p},e.children)))},vb.Search=tb,vb.TextArea=yb,vb.Password=Xv,vb.OTP=Fv;const bb=vb;var wb=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);oxb.forwardRef(((i,o)=>xb.createElement(n,Object.assign({ref:o,suffixCls:e,tagName:t},i))))}const _b=xb.forwardRef(((e,t)=>{const{prefixCls:n,suffixCls:i,className:o,tagName:r}=e,a=wb(e,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:s}=xb.useContext(j),c=s("layout",n),[u,d,h]=pn(c),p=i?`${c}-${i}`:c;return u(xb.createElement(r,Object.assign({className:l(n||p,o,d,h),ref:t},a)))})),Sb=xb.forwardRef(((e,t)=>{const{direction:n}=xb.useContext(j),[i,o]=xb.useState([]),{prefixCls:r,className:a,rootClassName:c,children:u,hasSider:d,tagName:h,style:p}=e,m=wb(e,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),f=W(m,["suffixCls"]),{getPrefixCls:g,className:y,style:v}=s("layout"),b=g("layout",r),w=function(e,t,n){return"boolean"==typeof n?n:!!e.length||ge(t).some((e=>e.type===hn))}(i,u,d),[x,C,_]=pn(b),S=l(b,{[`${b}-has-sider`]:w,[`${b}-rtl`]:"rtl"===n},y,a,c,C,_),k=xb.useMemo((()=>({siderHook:{addSider:e=>{o((t=>[].concat($(t),[e])))},removeSider:e=>{o((t=>t.filter((t=>t!==e))))}}})),[]);return x(xb.createElement(mn.Provider,{value:k},xb.createElement(h,Object.assign({ref:t,className:S,style:Object.assign(Object.assign({},v),p)},f),u)))})),kb=Cb({tagName:"div",displayName:"Layout"})(Sb),Eb=Cb({suffixCls:"header",tagName:"header",displayName:"Header"})(_b),$b=Cb({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(_b),Mb=Cb({suffixCls:"content",tagName:"main",displayName:"Content"})(_b),Rb=kb;Rb.Header=Eb,Rb.Footer=$b,Rb.Content=Mb,Rb.Sider=hn,Rb._InternalSiderContext=fn;const Ab=Rb,Ob=window.React,jb=window.React.useContext;let Tb=null,Nb=e=>e(),Lb=[],Ib={};function Db(){const{getContainer:e,duration:t,rtl:n,maxCount:i,top:o}=Ib,r=(null==e?void 0:e())||document.body;return{getContainer:()=>r,duration:t,rtl:n,maxCount:i,top:o}}const Hb=Ob.forwardRef(((e,t)=>{const{messageConfig:n,sync:i}=e,{getPrefixCls:o}=jb(j),r=Ib.prefixCls||o("message"),a=jb(pa),[s,l]=Ti(Object.assign(Object.assign(Object.assign({},n),{prefixCls:r}),a.message));return Ob.useImperativeHandle(t,(()=>{const e=Object.assign({},s);return Object.keys(e).forEach((t=>{e[t]=(...e)=>(i(),s[t].apply(s,e))})),{instance:e,sync:i}})),l})),Pb=Ob.forwardRef(((e,t)=>{const[n,i]=Ob.useState(Db),o=()=>{i(Db)};Ob.useEffect(o,[]);const r=re(),a=r.getRootPrefixCls(),s=r.getIconPrefixCls(),l=r.getTheme(),c=Ob.createElement(Hb,{ref:t,sync:o,messageConfig:n});return Ob.createElement(ie,{prefixCls:a,iconPrefixCls:s,theme:l},r.holderRender?r.holderRender(c):c)})),zb=()=>{if(!Tb){const e=document.createDocumentFragment(),t={fragment:e};return Tb=t,void Nb((()=>{kt()(Ob.createElement(Pb,{ref:e=>{const{instance:n,sync:i}=e||{};Promise.resolve().then((()=>{!t.instance&&n&&(t.instance=n,t.sync=i,zb())}))}}),e)}))}Tb.instance&&(Lb.forEach((e=>{const{type:t,skipped:n}=e;if(!n)switch(t){case"open":Nb((()=>{const t=Tb.instance.open(Object.assign(Object.assign({},Ib),e.config));null==t||t.then(e.resolve),e.setCloseFn(t)}));break;case"destroy":Nb((()=>{null==Tb||Tb.instance.destroy(e.key)}));break;default:Nb((()=>{var n;const i=(n=Tb.instance)[t].apply(n,$(e.args));null==i||i.then(e.resolve),e.setCloseFn(i)}))}})),Lb=[])},Fb={open:function(e){const t=ki((t=>{let n;const i={type:"open",config:e,resolve:t,setCloseFn:e=>{n=e}};return Lb.push(i),()=>{n?Nb((()=>{n()})):i.skipped=!0}}));return zb(),t},destroy:e=>{Lb.push({type:"destroy",key:e}),zb()},config:function(e){Ib=Object.assign(Object.assign({},Ib),e),Nb((()=>{var e;null===(e=null==Tb?void 0:Tb.sync)||void 0===e||e.call(Tb)}))},useMessage:function(e){return Ti(e)},_InternalPanelDoNotUseOrYouWillBeFired:e=>{const{prefixCls:t,className:n,type:i,icon:o,content:r}=e,a=xi(e,["prefixCls","className","type","icon","content"]),{getPrefixCls:s}=Ci.useContext(j),c=t||s("message"),u=T(c),[d,h,p]=wi(c,u);return d(Ci.createElement(ti,Object.assign({},a,{prefixCls:c,className:l(n,h,`${c}-notice-pure-panel`,p,u),eventKey:"pure",duration:null,content:Ci.createElement(Si,{prefixCls:c,type:i,icon:o},r)})))}};["success","info","warning","error","loading"].forEach((e=>{Fb[e]=(...t)=>function(e,t){const n=ki((n=>{let i;const o={type:e,args:t,resolve:n,setCloseFn:e=>{i=e}};return Lb.push(o),()=>{i?Nb((()=>{i()})):o.skipped=!0}}));return zb(),n}(e,t)}));const Vb=Fb;var Bb=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{prefixCls:t,className:n,closeIcon:i,closable:o,type:r,title:a,children:s,footer:c}=e,u=Bb(e,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:d}=Wb.useContext(j),h=d(),p=t||d("modal"),m=T(h),[f,g,y]=pr(p,m),v=`${p}-confirm`;let b={};return b=r?{closable:null!=o&&o,title:"",footer:"",children:Wb.createElement(xr,Object.assign({},e,{prefixCls:p,confirmPrefixCls:v,rootPrefixCls:h,content:s}))}:{closable:null==o||o,title:a,footer:null!==c&&Wb.createElement(rr,Object.assign({},e)),children:s},f(Wb.createElement(to,Object.assign({prefixCls:p,className:l(g,`${p}-pure-panel`,r&&v,r&&`${v}-${r}`,n,y,m)},u,{closeIcon:or(p,i),closable:o},b)))}));function Yb(e){return Ar(Or(e))}const Zb=yr;Zb.useModal=function(){const e=zr.useRef(null),[t,n]=zr.useState([]);zr.useEffect((()=>{t.length&&($(t).forEach((e=>{e()})),n([]))}),[t]);const i=zr.useCallback((t=>function(i){var o;Fr+=1;const r=zr.createRef();let a;const s=new Promise((e=>{a=e}));let l,c=!1;const u=zr.createElement(Pr,{key:`modal-${Fr}`,config:t(i),ref:r,afterClose:()=>{null==l||l()},isSilent:()=>c,onConfirm:e=>{a(e)}});return l=null===(o=e.current)||void 0===o?void 0:o.patchElement(u),l&&Sr.push(l),{destroy:()=>{function e(){var e;null===(e=r.current)||void 0===e||e.destroy()}r.current?e():n((t=>[].concat($(t),[e])))},update:e=>{function t(){var t;null===(t=r.current)||void 0===t||t.update(e)}r.current?t():n((e=>[].concat($(e),[t])))},then:e=>(c=!0,s.then(e))}}),[]);return[zr.useMemo((()=>({info:i(jr),success:i(Tr),error:i(Nr),warning:i(Or),confirm:i(Lr)})),[]),zr.createElement(Vr,{key:"modal-holder",ref:e})]},Zb.info=function(e){return Ar(jr(e))},Zb.success=function(e){return Ar(Tr(e))},Zb.error=function(e){return Ar(Nr(e))},Zb.warning=Yb,Zb.warn=Yb,Zb.confirm=function(e){return Ar(Lr(e))},Zb.destroyAll=function(){for(;Sr.length;){const e=Sr.pop();e&&e()}},Zb.config=function({rootPrefixCls:e}){$r=e},Zb._InternalPanelDoNotUseOrYouWillBeFired=Ub;const Gb=Zb,qb=window.React,Kb=window.React.useContext;let Qb=null,Xb=e=>e(),Jb=[],ew={};function tw(){const{getContainer:e,rtl:t,maxCount:n,top:i,bottom:o,showProgress:r,pauseOnHover:a}=ew,s=(null==e?void 0:e())||document.body;return{getContainer:()=>s,rtl:t,maxCount:n,top:i,bottom:o,showProgress:r,pauseOnHover:a}}const nw=qb.forwardRef(((e,t)=>{const{notificationConfig:n,sync:i}=e,{getPrefixCls:o}=Kb(j),r=ew.prefixCls||o("notification"),a=Kb(pa),[s,l]=ha(Object.assign(Object.assign(Object.assign({},n),{prefixCls:r}),a.notification));return qb.useEffect(i,[]),qb.useImperativeHandle(t,(()=>{const e=Object.assign({},s);return Object.keys(e).forEach((t=>{e[t]=(...e)=>(i(),s[t].apply(s,e))})),{instance:e,sync:i}})),l})),iw=qb.forwardRef(((e,t)=>{const[n,i]=qb.useState(tw),o=()=>{i(tw)};qb.useEffect(o,[]);const r=re(),a=r.getRootPrefixCls(),s=r.getIconPrefixCls(),l=r.getTheme(),c=qb.createElement(nw,{ref:t,sync:o,notificationConfig:n});return qb.createElement(ie,{prefixCls:a,iconPrefixCls:s,theme:l},r.holderRender?r.holderRender(c):c)})),ow=()=>{if(!Qb){const e=document.createDocumentFragment(),t={fragment:e};return Qb=t,void Xb((()=>{kt()(qb.createElement(iw,{ref:e=>{const{instance:n,sync:i}=e||{};Promise.resolve().then((()=>{!t.instance&&n&&(t.instance=n,t.sync=i,ow())}))}}),e)}))}Qb.instance&&(Jb.forEach((e=>{switch(e.type){case"open":Xb((()=>{Qb.instance.open(Object.assign(Object.assign({},ew),e.config))}));break;case"destroy":Xb((()=>{var t;null===(t=null==Qb?void 0:Qb.instance)||void 0===t||t.destroy(e.key)}))}})),Jb=[])};function rw(e){Jb.push({type:"open",config:e}),ow()}const aw={open:rw,destroy:e=>{Jb.push({type:"destroy",key:e}),ow()},config:function(e){ew=Object.assign(Object.assign({},ew),e),Xb((()=>{var e;null===(e=null==Qb?void 0:Qb.sync)||void 0===e||e.call(Qb)}))},useNotification:function(e){return ha(e)},_InternalPanelDoNotUseOrYouWillBeFired:e=>{const{prefixCls:t,className:n,icon:i,type:o,message:r,description:a,btn:s,actions:c,closable:u=!0,closeIcon:d,className:h}=e,p=ta(e,["prefixCls","className","icon","type","message","description","btn","actions","closable","closeIcon","className"]),{getPrefixCls:m}=na.useContext(j),f=null!=c?c:s,g=t||m("notification"),y=`${g}-notice`,v=T(g),[b,w,x]=Jr(g,v);return b(na.createElement("div",{className:l(`${y}-pure-panel`,w,n,x,v)},na.createElement(ea,{prefixCls:g}),na.createElement(ti,Object.assign({},p,{prefixCls:g,eventKey:"pure",duration:null,closable:u,className:l({notificationClassName:h}),closeIcon:ia(g,d),content:na.createElement(ra,{prefixCls:y,icon:i,type:o,message:r,description:a,actions:f})}))))}};["success","info","warning","error"].forEach((e=>{aw[e]=t=>rw(Object.assign(Object.assign({},t),{type:e}))}));const sw=aw;var lw=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"];const cw=window.React;var uw=cw.forwardRef((function(e,t){var n,o=e.prefixCls,r=void 0===o?"rc-switch":o,a=e.className,s=e.checked,c=e.defaultChecked,u=e.disabled,d=e.loadingIcon,h=e.checkedChildren,p=e.unCheckedChildren,m=e.onClick,f=e.onChange,g=e.onKeyDown,y=k(e,lw),v=de(!1,{value:s,defaultValue:c}),b=x(v,2),w=b[0],C=b[1];function S(e,t){var n=w;return u||(C(n=e),null==f||f(n,t)),n}var E=l(r,a,(_(n={},"".concat(r,"-checked"),w),_(n,"".concat(r,"-disabled"),u),n));return cw.createElement("button",i({},y,{type:"button",role:"switch","aria-checked":w,disabled:u,className:E,ref:t,onKeyDown:function(e){e.which===xt.LEFT?S(!1,e):e.which===xt.RIGHT&&S(!0,e),null==g||g(e)},onClick:function(e){var t=S(!w,e);null==m||m(t,e)}}),d,cw.createElement("span",{className:"".concat(r,"-inner")},cw.createElement("span",{className:"".concat(r,"-inner-checked")},h),cw.createElement("span",{className:"".concat(r,"-inner-unchecked")},p)))}));uw.displayName="Switch";const dw=e=>{const{componentCls:t,trackHeightSM:n,trackPadding:i,trackMinWidthSM:o,innerMinMarginSM:r,innerMaxMarginSM:s,handleSizeSM:l,calc:c}=e,u=`${t}-inner`,d=a(c(l).add(c(i).mul(2)).equal()),h=a(c(s).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:o,height:n,lineHeight:a(n),[`${t}-inner`]:{paddingInlineStart:s,paddingInlineEnd:r,[`${u}-checked, ${u}-unchecked`]:{minHeight:n},[`${u}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${h})`,marginInlineEnd:`calc(100% - ${d} + ${h})`},[`${u}-unchecked`]:{marginTop:c(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:l,height:l},[`${t}-loading-icon`]:{top:c(c(l).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:r,paddingInlineEnd:s,[`${u}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${u}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${h})`,marginInlineEnd:`calc(-100% + ${d} - ${h})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${a(c(l).add(i).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${u}`]:{[`${u}-unchecked`]:{marginInlineStart:c(e.marginXXS).div(2).equal(),marginInlineEnd:c(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${u}`]:{[`${u}-checked`]:{marginInlineStart:c(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:c(e.marginXXS).div(2).equal()}}}}}}},hw=e=>{const{componentCls:t,handleSize:n,calc:i}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:i(i(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},pw=e=>{const{componentCls:t,trackPadding:n,handleBg:i,handleShadow:o,handleSize:r,calc:s}=e,l=`${t}-handle`;return{[t]:{[l]:{position:"absolute",top:n,insetInlineStart:n,width:r,height:r,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:i,borderRadius:s(r).div(2).equal(),boxShadow:o,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${l}`]:{insetInlineStart:`calc(100% - ${a(s(r).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${l}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${l}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},mw=e=>{const{componentCls:t,trackHeight:n,trackPadding:i,innerMinMargin:o,innerMaxMargin:r,handleSize:s,calc:l}=e,c=`${t}-inner`,u=a(l(s).add(l(i).mul(2)).equal()),d=a(l(r).mul(2).equal());return{[t]:{[c]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:r,paddingInlineEnd:o,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${c}-checked, ${c}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:n},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${c}-unchecked`]:{marginTop:l(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${c}`]:{paddingInlineStart:o,paddingInlineEnd:r,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:l(i).mul(2).equal(),marginInlineEnd:l(i).mul(-1).mul(2).equal()}},[`&${t}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:l(i).mul(-1).mul(2).equal(),marginInlineEnd:l(i).mul(2).equal()}}}}}},fw=e=>{const{componentCls:t,trackHeight:n,trackMinWidth:i}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},r(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:i,height:n,lineHeight:a(n),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),q(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}},gw=o("Switch",(e=>{const t=R(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[fw(t),mw(t),pw(t),hw(t),dw(t)]}),(e=>{const{fontSize:t,lineHeight:n,controlHeight:i,colorWhite:o}=e,r=t*n,a=i/2,s=r-4,l=a-4;return{trackHeight:r,trackHeightSM:a,trackMinWidth:2*s+8,trackMinWidthSM:2*l+4,trackPadding:2,handleBg:o,handleSize:s,handleSizeSM:l,handleShadow:`0 2px 4px 0 ${new Ee("#00230b").setA(.2).toRgbString()}`,innerMinMargin:s/2,innerMaxMargin:s+2+4,innerMinMarginSM:l/2,innerMaxMarginSM:l+2+4}}));var yw=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{prefixCls:n,size:i,disabled:o,loading:r,className:a,rootClassName:s,style:c,checked:u,value:d,defaultChecked:h,defaultValue:p,onChange:m}=e,f=yw(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[g,y]=de(!1,{value:null!=u?u:d,defaultValue:null!=h?h:p}),{getPrefixCls:v,direction:b,switch:w}=vw.useContext(j),x=vw.useContext(Be),C=(null!=o?o:x)||r,_=v("switch",n),S=vw.createElement("div",{className:`${_}-handle`},r&&vw.createElement(N,{className:`${_}-loading-icon`})),[k,E,$]=gw(_),M=De(i),R=l(null==w?void 0:w.className,{[`${_}-small`]:"small"===M,[`${_}-loading`]:r,[`${_}-rtl`]:"rtl"===b},a,s,E,$),A=Object.assign(Object.assign({},null==w?void 0:w.style),c);return k(vw.createElement(yn,{component:"Switch",disabled:C},vw.createElement(uw,Object.assign({},f,{checked:g,onChange:(...e)=>{y(e[0]),null==m||m.apply(void 0,e)},prefixCls:_,className:R,style:A,disabled:C,ref:t,loadingIcon:S}))))}));bw.__ANT_SWITCH=!0;const ww=bw,xw=(dt.token,function(){const[e,t,n]=oe();return{theme:e,token:t,hashId:n}}),Cw=window.React;function _w(e){return null!==e&&"object"===C(e)}function Sw(e,t,n){if(!1===e||!1===t&&(!_w(e)||!e.closeIcon))return null;var i,o="boolean"!=typeof t?t:void 0;return _w(e)?E(E({},e),{},{closeIcon:null!==(i=e.closeIcon)&&void 0!==i?i:o}):n||e||t?{closeIcon:o}:"empty"}const kw=window.React.useMemo,Ew=window.React.useState;const $w=window.React;var Mw={fill:"transparent",pointerEvents:"auto"},Rw=function(e){var t=e.prefixCls,n=e.rootClassName,o=e.pos,r=e.showMask,a=e.style,s=void 0===a?{}:a,c=e.fill,u=void 0===c?"rgba(0,0,0,0.5)":c,d=e.open,h=e.animated,p=e.zIndex,m=e.disabledInteraction,f=H(),g="".concat(t,"-mask-").concat(f),y="object"===C(h)?null==h?void 0:h.placeholder:h,v="undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?{width:"100%",height:"100%"}:{width:"100vw",height:"100vh"};return $w.createElement(z,{open:d,autoLock:!0},$w.createElement("div",{className:l("".concat(t,"-mask"),n),style:E({position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:p,pointerEvents:o&&!m?"none":"auto"},s)},r?$w.createElement("svg",{style:{width:"100%",height:"100%"}},$w.createElement("defs",null,$w.createElement("mask",{id:g},$w.createElement("rect",i({x:"0",y:"0"},v,{fill:"white"})),o&&$w.createElement("rect",{x:o.left,y:o.top,rx:o.radius,width:o.width,height:o.height,fill:"black",className:y?"".concat(t,"-placeholder-animated"):""}))),$w.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:u,mask:"url(#".concat(g,")")}),o&&$w.createElement($w.Fragment,null,$w.createElement("rect",i({},Mw,{x:"0",y:"0",width:"100%",height:o.top})),$w.createElement("rect",i({},Mw,{x:"0",y:"0",width:o.left,height:"100%"})),$w.createElement("rect",i({},Mw,{x:"0",y:o.top+o.height,width:"100%",height:"calc(100vh - ".concat(o.top+o.height,"px)")})),$w.createElement("rect",i({},Mw,{x:o.left+o.width,y:"0",width:"calc(100vw - ".concat(o.left+o.width,"px)"),height:"100%"})))):null))},Aw=[0,0],Ow={left:{points:["cr","cl"],offset:[-8,0]},right:{points:["cl","cr"],offset:[8,0]},top:{points:["bc","tc"],offset:[0,-8]},bottom:{points:["tc","bc"],offset:[0,8]},topLeft:{points:["bl","tl"],offset:[0,-8]},leftTop:{points:["tr","tl"],offset:[-8,0]},topRight:{points:["br","tr"],offset:[0,-8]},rightTop:{points:["tl","tr"],offset:[8,0]},bottomRight:{points:["tr","br"],offset:[0,8]},rightBottom:{points:["bl","br"],offset:[8,0]},bottomLeft:{points:["tl","bl"],offset:[0,8]},leftBottom:{points:["br","bl"],offset:[-8,0]}};function jw(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t={};return Object.keys(Ow).forEach((function(n){t[n]=E(E({},Ow[n]),{},{autoArrow:e,targetOffset:Aw})})),t}jw();const Tw=window.React;function Nw(e){var t,n=e.prefixCls,o=e.current,r=e.total,a=e.title,s=e.description,c=e.onClose,u=e.onPrev,d=e.onNext,h=e.onFinish,p=e.className,m=e.closable,f=bt(m||{},!0),g=null!==(t=null==m?void 0:m.closeIcon)&&void 0!==t?t:Tw.createElement("span",{className:"".concat(n,"-close-x")},"×"),y=!!m;return Tw.createElement("div",{className:l("".concat(n,"-content"),p)},Tw.createElement("div",{className:"".concat(n,"-inner")},y&&Tw.createElement("button",i({type:"button",onClick:c,"aria-label":"Close"},f,{className:"".concat(n,"-close")}),g),Tw.createElement("div",{className:"".concat(n,"-header")},Tw.createElement("div",{className:"".concat(n,"-title")},a)),Tw.createElement("div",{className:"".concat(n,"-description")},s),Tw.createElement("div",{className:"".concat(n,"-footer")},Tw.createElement("div",{className:"".concat(n,"-sliders")},r>1?$(Array.from({length:r}).keys()).map((function(e,t){return Tw.createElement("span",{key:e,className:t===o?"active":""})})):null),Tw.createElement("div",{className:"".concat(n,"-buttons")},0!==o?Tw.createElement("button",{className:"".concat(n,"-prev-btn"),onClick:u},"Prev"):null,o===r-1?Tw.createElement("button",{className:"".concat(n,"-finish-btn"),onClick:h},"Finish"):Tw.createElement("button",{className:"".concat(n,"-next-btn"),onClick:d},"Next")))))}const Lw=window.React;var Iw=function(e){var t=e.current,n=e.renderPanel;return Lw.createElement(Lw.Fragment,null,"function"==typeof n?n(e,t):Lw.createElement(Nw,e))},Dw=["prefixCls","steps","defaultCurrent","current","onChange","onClose","onFinish","open","mask","arrow","rootClassName","placement","renderPanel","gap","animated","scrollIntoViewOptions","zIndex","closeIcon","closable","builtinPlacements","disabledInteraction"];const Hw=window.React,Pw=window.React.useMemo;var zw={left:"50%",top:"50%",width:1,height:1},Fw={block:"center",inline:"center"},Vw=function(e){var t=e.prefixCls,n=void 0===t?"rc-tour":t,o=e.steps,r=void 0===o?[]:o,a=e.defaultCurrent,s=e.current,c=e.onChange,u=e.onClose,d=e.onFinish,h=e.open,p=e.mask,m=void 0===p||p,f=e.arrow,g=void 0===f||f,y=e.rootClassName,v=e.placement,b=e.renderPanel,w=e.gap,_=e.animated,S=e.scrollIntoViewOptions,$=void 0===S?Fw:S,R=e.zIndex,A=void 0===R?1001:R,O=e.closeIcon,j=e.closable,T=e.builtinPlacements,N=e.disabledInteraction,L=k(e,Dw),I=Hw.useRef(),D=de(0,{value:s,defaultValue:a}),H=x(D,2),P=H[0],F=H[1],V=de(void 0,{value:h,postState:function(e){return!(P<0||P>=r.length)&&(null==e||e)}}),B=x(V,2),W=B[0],U=B[1],Y=Hw.useState(W),Z=x(Y,2),G=Z[0],q=Z[1],K=Hw.useRef(W);_e((function(){W&&(K.current||F(0),q(!0)),K.current=W}),[W]);var Q=r[P]||{},X=Q.target,J=Q.placement,ee=Q.style,te=Q.arrow,ne=Q.className,ie=Q.mask,oe=Q.scrollIntoViewOptions,re=void 0===oe?Fw:oe,ae=Q.closeIcon,se=function(e,t,n,i){return Cw.useMemo((function(){var o=Sw(e,t,!1),r=Sw(n,i,!0);return"empty"!==o?o:r}),[n,i,e,t])}(Q.closable,ae,j,O),le=W&&(null!=ie?ie:m),ce=function(e,t,n,i){var o=Ew(void 0),r=x(o,2),a=r[0],s=r[1];_e((function(){var t="function"==typeof e?e():e;s(t||null)}));var l=Ew(null),c=x(l,2),u=c[0],d=c[1],h=M((function(){if(a){o=a,r=window.innerWidth||document.documentElement.clientWidth,s=window.innerHeight||document.documentElement.clientHeight,c=(l=o.getBoundingClientRect()).top,u=l.right,h=l.bottom,p=l.left,!(c>=0&&p>=0&&u<=r&&h<=s)&&t&&a.scrollIntoView(i);var e=a.getBoundingClientRect(),n={left:e.left,top:e.top,width:e.width,height:e.height,radius:0};d((function(e){return JSON.stringify(e)!==JSON.stringify(n)?n:e}))}else d(null);var o,r,s,l,c,u,h,p})),p=function(e){var t;return null!==(t=Array.isArray(null==n?void 0:n.offset)?null==n?void 0:n.offset[e]:null==n?void 0:n.offset)&&void 0!==t?t:6};return _e((function(){return h(),window.addEventListener("resize",h),function(){window.removeEventListener("resize",h)}}),[a,t,h]),[kw((function(){if(!u)return u;var e,t=p(0),i=p(1),o="number"!=typeof(e=null==n?void 0:n.radius)||Number.isNaN(e)?2:null==n?void 0:n.radius;return{left:u.left-t,top:u.top-i,width:u.width+2*t,height:u.height+2*i,radius:o}}),[u,n]),a]}(X,h,w,null!=re?re:$),ue=x(ce,2),he=ue[0],pe=ue[1],me=function(e,t,n){var i;return null!==(i=null!=n?n:t)&&void 0!==i?i:null===e?"center":"bottom"}(pe,v,J),fe=!!pe&&(void 0===te?g:te),ge="object"===C(fe)&&fe.pointAtCenter;_e((function(){var e;null===(e=I.current)||void 0===e||e.forceAlign()}),[ge,P]);var ye=function(e){F(e),null==c||c(e)},ve=Pw((function(){return T?"function"==typeof T?T({arrowPointAtCenter:ge}):T:jw(ge)}),[T,ge]);if(void 0===pe||!G)return null;var we=function(){U(!1),null==u||u(P)},xe="boolean"==typeof le?le:!!le,Ce="boolean"==typeof le?void 0:le;return Hw.createElement(Hw.Fragment,null,Hw.createElement(Rw,{zIndex:A,prefixCls:n,pos:he,showMask:xe,style:null==Ce?void 0:Ce.style,fill:null==Ce?void 0:Ce.color,open:W,animated:_,rootClassName:y,disabledInteraction:N}),Hw.createElement(be,i({},L,{builtinPlacements:ve,ref:I,popupStyle:ee,popupPlacement:me,popupVisible:W,popupClassName:l(y,ne),prefixCls:n,popup:function(){return Hw.createElement(Iw,i({arrow:fe,key:"content",prefixCls:n,total:r.length,renderPanel:b,onPrev:function(){ye(P-1)},onNext:function(){ye(P+1)},onClose:we,current:P,onFinish:function(){we(),null==d||d()}},r[P],{closable:se}))},forceRender:!1,destroyPopupOnHide:!0,zIndex:A,getTriggerDOMNode:function(e){return e||pe||document.body},arrow:!!fe}),Hw.createElement(z,{open:W,autoLock:!0},Hw.createElement("div",{className:l(y,"".concat(n,"-target-placeholder")),style:E(E({},he||zw),{},{position:"fixed",pointerEvents:"none"})}))))};const Bw=window.React;function Ww(e){return null!=e}const Uw=e=>{var t,n;const{stepProps:i,current:o,type:r,indicatorsRender:a,actionsRender:s}=e,{prefixCls:c,total:u=1,title:d,onClose:h,onPrev:p,onNext:m,onFinish:f,cover:g,description:y,nextButtonProps:v,prevButtonProps:b,type:w,closable:x}=i,C=null!=w?w:r,_=bt(null!=x?x:{},!0),[S]=F("global",V.global),[k]=F("Tour",V.Tour),E=Bw.createElement("button",Object.assign({type:"button",onClick:h,className:`${c}-close`,"aria-label":null==S?void 0:S.close},_),(null==x?void 0:x.closeIcon)||Bw.createElement(wt,{className:`${c}-close-icon`})),M=o===u-1,R=Ww(d)?Bw.createElement("div",{className:`${c}-header`},Bw.createElement("div",{className:`${c}-title`},d)):null,A=Ww(y)?Bw.createElement("div",{className:`${c}-description`},y):null,O=Ww(g)?Bw.createElement("div",{className:`${c}-cover`},g):null;let j;j=a?a(o,u):$(Array.from({length:u}).keys()).map(((e,t)=>Bw.createElement("span",{key:e,className:l(t===o&&`${c}-indicator-active`,`${c}-indicator`)})));const T="primary"===C?"default":"primary",N={type:"default",ghost:"primary"===C},L=Bw.createElement(Bw.Fragment,null,0!==o?Bw.createElement(Ct,Object.assign({size:"small"},N,b,{onClick:()=>{var e;null==p||p(),null===(e=null==b?void 0:b.onClick)||void 0===e||e.call(b)},className:l(`${c}-prev-btn`,null==b?void 0:b.className)}),null!==(t=null==b?void 0:b.children)&&void 0!==t?t:null==k?void 0:k.Previous):null,Bw.createElement(Ct,Object.assign({size:"small",type:T},v,{onClick:()=>{var e;M?null==f||f():null==m||m(),null===(e=null==v?void 0:v.onClick)||void 0===e||e.call(v)},className:l(`${c}-next-btn`,null==v?void 0:v.className)}),null!==(n=null==v?void 0:v.children)&&void 0!==n?n:M?null==k?void 0:k.Finish:null==k?void 0:k.Next));return Bw.createElement("div",{className:`${c}-content`},Bw.createElement("div",{className:`${c}-inner`},x&&E,O,R,A,Bw.createElement("div",{className:`${c}-footer`},u>1&&Bw.createElement("div",{className:`${c}-indicators`},j),Bw.createElement("div",{className:`${c}-buttons`},s?s(L,{current:o,total:u}):L))))},Yw=o("Tour",(e=>{const{borderRadiusLG:t}=e;return(e=>{const{componentCls:t,padding:n,paddingXS:i,borderRadius:o,borderRadiusXS:s,colorPrimary:l,colorFill:c,indicatorHeight:u,indicatorWidth:d,boxShadowTertiary:h,zIndexPopup:p,colorBgElevated:m,fontWeightStrong:f,marginXS:g,colorTextLightSolid:y,tourBorderRadius:v,colorWhite:b,primaryNextBtnHoverBg:w,closeBtnSize:x,motionDurationSlow:C,antCls:_,primaryPrevBtnBg:S}=e;return[{[t]:Object.assign(Object.assign({},r(e)),{position:"absolute",zIndex:p,maxWidth:"fit-content",visibility:"visible",width:520,"--antd-arrow-background-color":m,"&-pure":{maxWidth:"100%",position:"relative"},[`&${t}-hidden`]:{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{textAlign:"start",textDecoration:"none",borderRadius:v,boxShadow:h,position:"relative",backgroundColor:m,border:"none",backgroundClip:"padding-box",[`${t}-close`]:Object.assign({position:"absolute",top:n,insetInlineEnd:n,color:e.colorIcon,background:"none",border:"none",width:x,height:x,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer","&:hover":{color:e.colorIconHover,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},q(e)),[`${t}-cover`]:{textAlign:"center",padding:`${a(e.calc(n).add(x).add(i).equal())} ${a(n)} 0`,img:{width:"100%"}},[`${t}-header`]:{padding:`${a(n)} ${a(n)} ${a(i)}`,width:`calc(100% - ${a(x)})`,wordBreak:"break-word",[`${t}-title`]:{fontWeight:f}},[`${t}-description`]:{padding:`0 ${a(n)}`,wordWrap:"break-word"},[`${t}-footer`]:{padding:`${a(i)} ${a(n)} ${a(n)}`,textAlign:"end",borderRadius:`0 0 ${a(s)} ${a(s)}`,display:"flex",[`${t}-indicators`]:{display:"inline-block",[`${t}-indicator`]:{width:d,height:u,display:"inline-block",borderRadius:"50%",background:c,"&:not(:last-child)":{marginInlineEnd:u},"&-active":{background:l}}},[`${t}-buttons`]:{marginInlineStart:"auto",[`${_}-btn`]:{marginInlineStart:g}}}},[`${t}-primary, &${t}-primary`]:{"--antd-arrow-background-color":l,[`${t}-inner`]:{color:y,textAlign:"start",textDecoration:"none",backgroundColor:l,borderRadius:o,boxShadow:h,[`${t}-close`]:{color:y},[`${t}-indicators`]:{[`${t}-indicator`]:{background:S,"&-active":{background:y}}},[`${t}-prev-btn`]:{color:y,borderColor:S,backgroundColor:l,"&:hover":{backgroundColor:S,borderColor:"transparent"}},[`${t}-next-btn`]:{color:l,borderColor:"transparent",background:b,"&:hover":{background:w}}}}}),[`${t}-mask`]:{[`${t}-placeholder-animated`]:{transition:`all ${C}`}},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${t}-inner`]:{borderRadius:e.min(v,pt)}}},ae(e,"var(--antd-arrow-background-color)")]})(R(e,{indicatorWidth:6,indicatorHeight:6,tourBorderRadius:t}))}),(e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70,closeBtnSize:e.fontSize*e.lineHeight,primaryPrevBtnBg:new Ee(e.colorTextLightSolid).setA(.15).toRgbString(),primaryNextBtnHoverBg:new Ee(e.colorBgTextHover).onBackground(e.colorWhite).toRgbString()},ce({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),le(e))));var Zw=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{prefixCls:t,current:n=0,total:i=6,className:o,style:r,type:a,closable:s,closeIcon:c}=e,u=Zw(e,["prefixCls","current","total","className","style","type","closable","closeIcon"]),{getPrefixCls:d}=Gw.useContext(j),h=d("tour",t),[p,m,f]=Yw(h),[g,y]=vo({closable:s,closeIcon:c},null,{closable:!0,closeIconRender:e=>{var t;return Gw.isValidElement(e)?pe(e,{className:l(null===(t=e.props)||void 0===t?void 0:t.className,`${h}-close-icon`)}):e}});return p(Gw.createElement(xa,{prefixCls:h,hashId:m,className:l(o,`${h}-pure`,a&&`${h}-${a}`,f),style:r},Gw.createElement(Uw,{stepProps:Object.assign(Object.assign({},u),{prefixCls:h,total:i,closable:g?{closeIcon:y}:void 0}),current:n,type:a})))}));var Kw=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o{const{prefixCls:t,type:n,rootClassName:i,indicatorsRender:o,actionsRender:r,steps:a,closeIcon:s}=e,c=Kw(e,["prefixCls","type","rootClassName","indicatorsRender","actionsRender","steps","closeIcon"]),{getPrefixCls:u,direction:d,tour:h}=Xw(j),p=u("tour",t),[m,f,g]=Yw(p),[,y]=oe(),v=Qw.useMemo((()=>null==a?void 0:a.map((e=>{var t;return Object.assign(Object.assign({},e),{className:l(e.className,{[`${p}-primary`]:"primary"===(null!==(t=e.type)&&void 0!==t?t:n)})})}))),[a,n]),b=l({[`${p}-rtl`]:"rtl"===d},f,g,i),[w,x]=Q("Tour",c.zIndex);return m(Qw.createElement(J.Provider,{value:x},Qw.createElement(Vw,Object.assign({},c,{closeIcon:null!=s?s:null==h?void 0:h.closeIcon,zIndex:w,rootClassName:b,prefixCls:p,animated:!0,renderPanel:(e,t)=>Qw.createElement(Uw,{type:n,stepProps:e,current:t,indicatorsRender:o,actionsRender:r}),builtinPlacements:e=>{var t;return mt({arrowPointAtCenter:null===(t=null==e?void 0:e.arrowPointAtCenter)||void 0===t||t,autoAdjustOverflow:!0,offset:y.marginXXS,arrowWidth:y.sizePopupArrow,borderRadius:y.borderRadius})},steps:v}))))};Jw._InternalPanelDoNotUseOrYouWillBeFired=qw;const ex=Jw;var tx={"text/plain":"Text","text/html":"Url",default:"Text"};const nx=ve((function(e,t){var n,i,o,r,a,s,l=!1;t||(t={}),n=t.debug||!1;try{if(o=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],i=0;iMn.jsx(ie,{prefixCls:"yaymail",direction:window.yaymailData.is_rtl?"rtl":"ltr",theme:ox,children:null==e?void 0:e.children}),ax=e=>{let t;const n=new Set,i=(e,i)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=i?i:"object"!=typeof o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,r={setState:i,getState:o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{n.clear()}};return t=e(i,o,r),r},sx=e=>e?ax(e):ax;var lx={exports:{}},cx={},ux={exports:{}},dx={},hx=window.React,px="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},mx=hx.useState,fx=hx.useEffect,gx=hx.useLayoutEffect,yx=hx.useDebugValue;function vx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!px(e,n)}catch(i){return!0}}var bx="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),i=mx({inst:{value:n,getSnapshot:t}}),o=i[0].inst,r=i[1];return gx((function(){o.value=n,o.getSnapshot=t,vx(o)&&r({inst:o})}),[e,n,t]),fx((function(){return vx(o)&&r({inst:o}),e((function(){vx(o)&&r({inst:o})}))}),[e]),yx(n),n};dx.useSyncExternalStore=void 0!==hx.useSyncExternalStore?hx.useSyncExternalStore:bx,ux.exports=dx;var wx=ux.exports,xx=window.React,Cx=wx,Sx="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},kx=Cx.useSyncExternalStore,Ex=xx.useRef,$x=xx.useEffect,Mx=xx.useMemo,Rx=xx.useDebugValue;cx.useSyncExternalStoreWithSelector=function(e,t,n,i,o){var r=Ex(null);if(null===r.current){var a={hasValue:!1,value:null};r.current=a}else a=r.current;r=Mx((function(){function e(e){if(!l){if(l=!0,r=e,e=i(e),void 0!==o&&a.hasValue){var t=a.value;if(o(t,e))return s=t}return s=e}if(t=s,Sx(r,e))return t;var n=i(e);return void 0!==o&&o(t,n)?t:(r=e,s=n)}var r,s,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,n,i,o]);var s=kx(e,r[0],r[1]);return $x((function(){a.hasValue=!0,a.value=s}),[s]),Rx(s),s},lx.exports=cx;var Ax=lx.exports;const Ox=ve(Ax),jx=window.React.useDebugValue,{useSyncExternalStoreWithSelector:Tx}=Ox,Nx=e=>{const t="function"==typeof e?sx(e):e,n=(e,n)=>function(e,t=e.getState,n){const i=Tx(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return jx(i),i}(t,e,n);return Object.assign(n,t),n},Lx=Nx(((e,t)=>({notify:null,setNotifyFunction:t=>{e((e=>({...e,notify:t})))}})));const Ix=()=>{const e=Lx((e=>e.setNotifyFunction)),[t,n]=sw.useNotification({maxCount:1});return e(((e,n,i)=>{t[e]({message:n,placement:i??"bottomRight",duration:3})})),Mn.jsx(Mn.Fragment,{children:n})};function Dx(){return Dx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{o.removeEventListener(zx,d),l=null}},createHref:e=>function(e,t){let n=e.document.querySelector("base"),i="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");i=-1===n?t:t.slice(0,n)}return i+"#"+("string"==typeof t?t:Yx(t))}(o,e),createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s=Hx.Push;let i=Ux(p.location,e,t);n&&n(i,e),c=u()+1;let d=Wx(i,c),h=p.createHref(i);try{a.pushState(d,"",h)}catch(m){if(m instanceof DOMException&&"DataCloneError"===m.name)throw m;o.location.assign(h)}r&&l&&l({action:s,location:p.location,delta:1})},replace:function(e,t){s=Hx.Replace;let i=Ux(p.location,e,t);n&&n(i,e),c=u();let o=Wx(i,c),d=p.createHref(i);a.replaceState(o,"",d),r&&l&&l({action:s,location:p.location,delta:0})},go:e=>a.go(e)};return p}(0,0,(function(e,t){Bx("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function Vx(e,t){if(!1===e||null==e)throw new Error(t)}function Bx(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function Wx(e,t){return{usr:e.state,key:e.key,idx:t}}function Ux(e,t,n,i){return void 0===n&&(n=null),Dx({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?Zx(t):t,{state:n,key:t&&t.key||i||Math.random().toString(36).substr(2,8)})}function Yx(e){let{pathname:t="/",search:n="",hash:i=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),i&&"#"!==i&&(t+="#"===i.charAt(0)?i:"#"+i),t}function Zx(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let i=e.indexOf("?");i>=0&&(t.search=e.substr(i),e=e.substr(0,i)),e&&(t.pathname=e)}return t}var Gx,qx;(qx=Gx||(Gx={})).data="data",qx.deferred="deferred",qx.redirect="redirect",qx.error="error";const Kx=new Set(["lazy","caseSensitive","path","id","index","children"]);function Qx(e,t,n,i){return void 0===n&&(n=[]),void 0===i&&(i={}),e.map(((e,o)=>{let r=[...n,o],a="string"==typeof e.id?e.id:r.join("-");if(Vx(!0!==e.index||!e.children,"Cannot specify children on an index route"),Vx(!i[a],'Found a route id collision on id "'+a+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){let n=Dx({},e,t(e),{id:a});return i[a]=n,n}{let n=Dx({},e,t(e),{id:a,children:void 0});return i[a]=n,e.children&&(n.children=Qx(e.children,t,r,i)),n}}))}function Xx(e,t,n){void 0===n&&(n="/");let i=sC(("string"==typeof t?Zx(t):t).pathname||"/",n);if(null==i)return null;let o=Jx(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let r=null;for(let a=0;null==r&&a{let a={relativePath:void 0===r?e.path||"":r,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};a.relativePath.startsWith("/")&&(Vx(a.relativePath.startsWith(i),'Absolute route path "'+a.relativePath+'" nested under path "'+i+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(i.length));let s=dC([i,a.relativePath]),l=n.concat(a);e.children&&e.children.length>0&&(Vx(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),Jx(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:iC(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let i of eC(e.path))o(e,t,i);else o(e,t)})),t}function eC(e){let t=e.split("/");if(0===t.length)return[];let[n,...i]=t,o=n.endsWith("?"),r=n.replace(/\?$/,"");if(0===i.length)return o?[r,""]:[r];let a=eC(i.join("/")),s=[];return s.push(...a.map((e=>""===e?r:[r,e].join("/")))),o&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const tC=/^:\w+$/,nC=e=>"*"===e;function iC(e,t){let n=e.split("/"),i=n.length;return n.some(nC)&&(i+=-2),t&&(i+=2),n.filter((e=>!nC(e))).reduce(((e,t)=>e+(tC.test(t)?3:""===t?1:10)),i)}function oC(e,t){let{routesMeta:n}=e,i={},o="/",r=[];for(let a=0;a(i.push(t),"/([^\\/]+)")));return e.endsWith("*")?(i.push("*"),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),i]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let r=o[0],a=r.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:i.reduce(((e,t,n)=>{if("*"===t){let e=s[n]||"";a=r.slice(0,r.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return Bx(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(s[n]||"",t),e}),{}),pathname:r,pathnameBase:a,pattern:e}}function aC(e){try{return decodeURI(e)}catch(t){return Bx(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function sC(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,i=e.charAt(n);return i&&"/"!==i?null:e.slice(n)||"/"}function lC(e,t,n,i){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(i)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function cC(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function uC(e,t,n,i){let o;void 0===i&&(i=!1),"string"==typeof e?o=Zx(e):(o=Dx({},e),Vx(!o.pathname||!o.pathname.includes("?"),lC("?","pathname","search",o)),Vx(!o.pathname||!o.pathname.includes("#"),lC("#","pathname","hash",o)),Vx(!o.search||!o.search.includes("#"),lC("#","search","hash",o)));let r,a=""===e||""===o.pathname,s=a?"/":o.pathname;if(i||null==s)r=n;else{let e=t.length-1;if(s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}r=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:n,search:i="",hash:o=""}="string"==typeof e?Zx(e):e,r=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:r,search:pC(i),hash:mC(o)}}(o,r),c=s&&"/"!==s&&s.endsWith("/"),u=(a||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}const dC=e=>e.join("/").replace(/\/\/+/g,"/"),hC=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),pC=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",mC=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;class fC{constructor(e,t,n,i){void 0===i&&(i=!1),this.status=e,this.statusText=t||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function gC(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const yC=["post","put","patch","delete"],vC=new Set(yC),bC=["get",...yC],wC=new Set(bC),xC=new Set([301,302,303,307,308]),CC=new Set([307,308]),_C={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},SC={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},kC={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},EC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$C=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)});function MC(e,t,n,i,o,r,a){let s,l;if(null!=r&&"path"!==a){s=[];for(let e of t)if(s.push(e),e.route.id===r){l=e;break}}else s=t,l=t[t.length-1];let c=uC(o||".",cC(s).map((e=>e.pathnameBase)),sC(e.pathname,n)||e.pathname,"path"===a);return null==o&&(c.search=e.search,c.hash=e.hash),null!=o&&""!==o&&"."!==o||!l||!l.route.index||QC(c.search)||(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),i&&"/"!==n&&(c.pathname="/"===c.pathname?n:dC([n,c.pathname])),Yx(c)}function RC(e,t,n,i){if(!i||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(i))return{path:n};if(i.formMethod&&(o=i.formMethod,!wC.has(o.toLowerCase())))return{path:n,error:VC(405,{method:i.formMethod})};var o;let r,a,s=()=>({path:n,error:VC(400,{type:"invalid-body"})}),l=i.formMethod||"get",c=e?l.toUpperCase():l.toLowerCase(),u=WC(n);if(void 0!==i.body){if("text/plain"===i.formEncType){if(!GC(c))return s();let e="string"==typeof i.body?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce(((e,t)=>{let[n,i]=t;return""+e+n+"="+i+"\n"}),""):String(i.body);return{path:n,submission:{formMethod:c,formAction:u,formEncType:i.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===i.formEncType){if(!GC(c))return s();try{let e="string"==typeof i.body?JSON.parse(i.body):i.body;return{path:n,submission:{formMethod:c,formAction:u,formEncType:i.formEncType,formData:void 0,json:e,text:void 0}}}catch(p){return s()}}}if(Vx("function"==typeof FormData,"FormData is not available in this environment"),i.formData)r=IC(i.formData),a=i.formData;else if(i.body instanceof FormData)r=IC(i.body),a=i.body;else if(i.body instanceof URLSearchParams)r=i.body,a=DC(r);else if(null==i.body)r=new URLSearchParams,a=new FormData;else try{r=new URLSearchParams(i.body),a=DC(r)}catch(p){return s()}let d={formMethod:c,formAction:u,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:a,json:void 0,text:void 0};if(GC(d.formMethod))return{path:n,submission:d};let h=Zx(n);return t&&h.search&&QC(h.search)&&r.append("index",""),h.search="?"+r,{path:Yx(h),submission:d}}function AC(e,t,n,i,o,r,a,s,l,c,u,d,h,p){let m=p?Object.values(p)[0]:h?Object.values(h)[0]:void 0,f=e.createURL(t.location),g=e.createURL(o),y=p?Object.keys(p)[0]:void 0,v=function(e,t){let n=e;if(t){let i=e.findIndex((e=>e.route.id===t));i>=0&&(n=e.slice(0,i))}return n}(n,y),b=v.filter(((e,n)=>{if(e.route.lazy)return!0;if(null==e.route.loader)return!1;if(function(e,t,n){let i=!t||n.route.id!==t.route.id,o=void 0===e[n.route.id];return i||o}(t.loaderData,t.matches[n],e)||a.some((t=>t===e.route.id)))return!0;let o=t.matches[n],s=e;return jC(e,Dx({currentUrl:f,currentParams:o.params,nextUrl:g,nextParams:s.params},i,{actionResult:m,defaultShouldRevalidate:r||f.pathname+f.search===g.pathname+g.search||f.search!==g.search||OC(o,s)}))})),w=[];return l.forEach(((e,o)=>{if(!n.some((t=>t.route.id===e.routeId)))return;let a=Xx(u,e.path,d);if(!a)return void w.push({key:o,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let l=t.fetchers.get(o),h=l&&"idle"!==l.state&&void 0===l.data&&!c.has(o),p=XC(a,e.path);(s.includes(o)||h||jC(p,Dx({currentUrl:f,currentParams:t.matches[t.matches.length-1].params,nextUrl:g,nextParams:n[n.length-1].params},i,{actionResult:m,defaultShouldRevalidate:r})))&&w.push({key:o,routeId:e.routeId,path:e.path,matches:a,match:p,controller:new AbortController})})),[b,w]}function OC(e,t){let n=e.route.path;return e.pathname!==t.pathname||null!=n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function jC(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if("boolean"==typeof n)return n}return t.defaultShouldRevalidate}async function TC(e,t,n){if(!e.lazy)return;let i=await e.lazy();if(!e.lazy)return;let o=n[e.id];Vx(o,"No route found in manifest");let r={};for(let a in i){let e=void 0!==o[a]&&"hasErrorBoundary"!==a;Bx(!e,'Route "'+o.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+a+'" will be ignored.'),e||Kx.has(a)||(r[a]=i[a])}Object.assign(o,r),Object.assign(o,Dx({},t(o),{lazy:void 0}))}async function NC(e,t,n,i,o,r,a,s){let l,c,u;void 0===s&&(s={});let d=e=>{let i,o=new Promise(((e,t)=>i=t));return u=()=>i(),t.signal.addEventListener("abort",u),Promise.race([e({request:t,params:n.params,context:s.requestContext}),o])};try{let i=n.route[e];if(n.route.lazy)if(i)c=(await Promise.all([d(i),TC(n.route,r,o)]))[0];else{if(await TC(n.route,r,o),i=n.route[e],!i){if("action"===e){let e=new URL(t.url),i=e.pathname+e.search;throw VC(405,{method:t.method,pathname:i,routeId:n.route.id})}return{type:Gx.data,data:void 0}}c=await d(i)}else{if(!i){let e=new URL(t.url);throw VC(404,{pathname:e.pathname+e.search})}c=await d(i)}Vx(void 0!==c,"You defined "+("action"===e?"an action":"a loader")+' for route "'+n.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(f){l=Gx.error,c=f}finally{u&&t.signal.removeEventListener("abort",u)}if(null!=(h=c)&&"number"==typeof h.status&&"string"==typeof h.statusText&&"object"==typeof h.headers&&void 0!==h.body){let e,o=c.status;if(xC.has(o)){let e=c.headers.get("Location");if(Vx(e,"Redirects returned/thrown from loaders/actions must have a Location header"),EC.test(e)){if(!s.isStaticRequest){let n=new URL(t.url),i=e.startsWith("//")?new URL(n.protocol+e):new URL(e),o=null!=sC(i.pathname,a);i.origin===n.origin&&o&&(e=i.pathname+i.search+i.hash)}}else e=MC(new URL(t.url),i.slice(0,i.indexOf(n)+1),a,!0,e);if(s.isStaticRequest)throw c.headers.set("Location",e),c;return{type:Gx.redirect,status:o,location:e,revalidate:null!==c.headers.get("X-Remix-Revalidate")}}if(s.isRouteRequest)throw{type:l||Gx.data,response:c};let r=c.headers.get("Content-Type");return e=r&&/\bapplication\/json\b/.test(r)?await c.json():await c.text(),l===Gx.error?{type:l,error:new fC(o,c.statusText,e),headers:c.headers}:{type:Gx.data,data:e,statusCode:c.status,headers:c.headers}}var h,p,m;return l===Gx.error?{type:l,error:c}:function(e){let t=e;return t&&"object"==typeof t&&"object"==typeof t.data&&"function"==typeof t.subscribe&&"function"==typeof t.cancel&&"function"==typeof t.resolveData}(c)?{type:Gx.deferred,deferredData:c,statusCode:null==(p=c.init)?void 0:p.status,headers:(null==(m=c.init)?void 0:m.headers)&&new Headers(c.init.headers)}:{type:Gx.data,data:c}}function LC(e,t,n,i){let o=e.createURL(WC(t)).toString(),r={signal:n};if(i&&GC(i.formMethod)){let{formMethod:e,formEncType:t}=i;r.method=e.toUpperCase(),"application/json"===t?(r.headers=new Headers({"Content-Type":t}),r.body=JSON.stringify(i.json)):"text/plain"===t?r.body=i.text:"application/x-www-form-urlencoded"===t&&i.formData?r.body=IC(i.formData):r.body=i.formData}return new Request(o,r)}function IC(e){let t=new URLSearchParams;for(let[n,i]of e.entries())t.append(n,"string"==typeof i?i:i.name);return t}function DC(e){let t=new FormData;for(let[n,i]of e.entries())t.append(n,i);return t}function HC(e,t,n,i,o,r,a,s){let{loaderData:l,errors:c}=function(e,t,n,i,o){let r,a={},s=null,l=!1,c={};return n.forEach(((n,u)=>{let d=t[u].route.id;if(Vx(!ZC(n),"Cannot handle redirect results in processLoaderData"),YC(n)){let t=zC(e,d),o=n.error;i&&(o=Object.values(i)[0],i=void 0),s=s||{},null==s[t.route.id]&&(s[t.route.id]=o),a[d]=void 0,l||(l=!0,r=gC(n.error)?n.error.status:500),n.headers&&(c[d]=n.headers)}else UC(n)?(o.set(d,n.deferredData),a[d]=n.deferredData.data):a[d]=n.data,null==n.statusCode||200===n.statusCode||l||(r=n.statusCode),n.headers&&(c[d]=n.headers)})),i&&(s=i,a[Object.keys(i)[0]]=void 0),{loaderData:a,errors:s,statusCode:r||200,loaderHeaders:c}}(t,n,i,o,s);for(let u=0;ue.route.id===t))+1):[...e]).reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function FC(e){let t=e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function VC(e,t){let{pathname:n,routeId:i,method:o,type:r}=void 0===t?{}:t,a="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(a="Bad Request",o&&n&&i?s="You made a "+o+' request to "'+n+'" but did not provide a `loader` for route "'+i+'", so there is no way to handle the request.':"defer-action"===r?s="defer() is not supported in actions":"invalid-body"===r&&(s="Unable to encode submission body")):403===e?(a="Forbidden",s='Route "'+i+'" does not match URL "'+n+'"'):404===e?(a="Not Found",s='No route matches URL "'+n+'"'):405===e&&(a="Method Not Allowed",o&&n&&i?s="You made a "+o.toUpperCase()+' request to "'+n+'" but did not provide an `action` for route "'+i+'", so there is no way to handle the request.':o&&(s='Invalid request method "'+o.toUpperCase()+'"')),new fC(e||500,a,new Error(s),!0)}function BC(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(ZC(n))return n}}function WC(e){return Yx(Dx({},"string"==typeof e?Zx(e):e,{hash:""}))}function UC(e){return e.type===Gx.deferred}function YC(e){return e.type===Gx.error}function ZC(e){return(e&&e.type)===Gx.redirect}function GC(e){return vC.has(e.toLowerCase())}async function qC(e,t,n,i,o,r){for(let a=0;ae.route.id===l.route.id)),u=null!=c&&!OC(c,l)&&void 0!==(r&&r[l.route.id]);if(UC(s)&&(o||u)){let e=i[a];Vx(e,"Expected an AbortSignal for revalidating fetcher deferred result"),await KC(s,e,o).then((e=>{e&&(n[a]=e||n[a])}))}}}async function KC(e,t,n){if(void 0===n&&(n=!1),!(await e.deferredData.resolveData(t))){if(n)try{return{type:Gx.data,data:e.deferredData.unwrappedData}}catch(i){return{type:Gx.error,error:i}}return{type:Gx.data,data:e.deferredData.data}}}function QC(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function XC(e,t){let n="string"==typeof t?Zx(t).search:t.search;if(e[e.length-1].route.index&&QC(n||""))return e[e.length-1];let i=cC(e);return i[i.length-1]}function JC(e){let{formMethod:t,formAction:n,formEncType:i,text:o,formData:r,json:a}=e;if(t&&n&&i)return null!=o?{formMethod:t,formAction:n,formEncType:i,formData:void 0,json:void 0,text:o}:null!=r?{formMethod:t,formAction:n,formEncType:i,formData:r,json:void 0,text:void 0}:void 0!==a?{formMethod:t,formAction:n,formEncType:i,formData:void 0,json:a,text:void 0}:void 0}function e_(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function t_(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t," _hasFetcherDoneAnything ":!0}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t," _hasFetcherDoneAnything ":!0}}function n_(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e," _hasFetcherDoneAnything ":!0}}const i_=window.React;function o_(){return o_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{n.current=!0})),i_.useCallback((function(i,o){void 0===o&&(o={}),n.current&&("number"==typeof i?e.navigate(i):e.navigate(i,o_({fromRouteId:t},o)))}),[e,t])}():function(){d_()||Vx(!1);let e=i_.useContext(r_),{basename:t,navigator:n}=i_.useContext(s_),{matches:i}=i_.useContext(c_),{pathname:o}=h_(),r=JSON.stringify(cC(i).map((e=>e.pathnameBase))),a=i_.useRef(!1);return p_((()=>{a.current=!0})),i_.useCallback((function(i,s){if(void 0===s&&(s={}),!a.current)return;if("number"==typeof i)return void n.go(i);let l=uC(i,JSON.parse(r),o,"path"===s.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:dC([t,l.pathname])),(s.replace?n.replace:n.push)(l,s.state,s)}),[t,n,r,o,e])}()}const f_=i_.createContext(null);function g_(e,t){let{relative:n}=void 0===t?{}:t,{matches:i}=i_.useContext(c_),{pathname:o}=h_(),r=JSON.stringify(cC(i).map((e=>e.pathnameBase)));return i_.useMemo((()=>uC(e,JSON.parse(r),o,"path"===n)),[e,r,o,n])}function y_(){let e=function(){var e;let t=i_.useContext(u_),n=$_(S_.UseRouteError),i=M_(S_.UseRouteError);return t||(null==(e=n.errors)?void 0:e[i])}(),t=gC(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return i_.createElement(i_.Fragment,null,i_.createElement("h2",null,"Unexpected Application Error!"),i_.createElement("h3",{style:{fontStyle:"italic"}},t),n?i_.createElement("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"}},n):null,null)}const v_=i_.createElement(y_,null);class b_ extends i_.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?i_.createElement(c_.Provider,{value:this.props.routeContext},i_.createElement(u_.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function w_(e){let{routeContext:t,match:n,children:i}=e,o=i_.useContext(r_);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),i_.createElement(c_.Provider,{value:t},i)}var x_,C_,S_,k_;function E_(e){let t=i_.useContext(r_);return t||Vx(!1),t}function $_(e){let t=i_.useContext(a_);return t||Vx(!1),t}function M_(e){let t=function(){let e=i_.useContext(c_);return e||Vx(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||Vx(!1),n.route.id}(C_=x_||(x_={})).UseBlocker="useBlocker",C_.UseRevalidator="useRevalidator",C_.UseNavigateStable="useNavigate",(k_=S_||(S_={})).UseBlocker="useBlocker",k_.UseLoaderData="useLoaderData",k_.UseActionData="useActionData",k_.UseRouteError="useRouteError",k_.UseNavigation="useNavigation",k_.UseRouteLoaderData="useRouteLoaderData",k_.UseMatches="useMatches",k_.UseRevalidator="useRevalidator",k_.UseNavigateStable="useNavigate",k_.UseRouteId="useRouteId";let R_=0;const A_=i_.startTransition;function O_(e){let{fallbackElement:t,router:n,future:i}=e,[o,r]=i_.useState(n.state),{v7_startTransition:a}=i||{},s=i_.useCallback((e=>{a&&A_?A_((()=>r(e))):r(e)}),[r,a]);i_.useLayoutEffect((()=>n.subscribe(s)),[n,s]);let l=i_.useMemo((()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:e=>n.navigate(e),push:(e,t,i)=>n.navigate(e,{state:t,preventScrollReset:null==i?void 0:i.preventScrollReset}),replace:(e,t,i)=>n.navigate(e,{replace:!0,state:t,preventScrollReset:null==i?void 0:i.preventScrollReset})})),[n]),c=n.basename||"/",u=i_.useMemo((()=>({router:n,navigator:l,static:!1,basename:c})),[n,l,c]);return i_.createElement(i_.Fragment,null,i_.createElement(r_.Provider,{value:u},i_.createElement(a_.Provider,{value:o},i_.createElement(L_,{basename:c,location:o.location,navigationType:o.historyAction,navigator:l},o.initialized?i_.createElement(j_,{routes:n.routes,state:o}):t))),null)}function j_(e){let{routes:t,state:n}=e;return function(e,t,n){d_()||Vx(!1);let{navigator:i}=i_.useContext(s_),{matches:o}=i_.useContext(c_),r=o[o.length-1],a=r?r.params:{};!r||r.pathname;let s=r?r.pathnameBase:"/";r&&r.route;let l,c=h_();if(t){var u;let e="string"==typeof t?Zx(t):t;"/"===s||(null==(u=e.pathname)?void 0:u.startsWith(s))||Vx(!1),l=e}else l=c;let d=l.pathname||"/",h=Xx(e,{pathname:"/"===s?d:d.slice(s.length)||"/"}),p=function(e,t,n){var i,o;if(void 0===t&&(t=[]),void 0===n&&(n=null),null==e){if(null==(o=n)||!o.errors)return null;e=n.matches}let r=e,a=null==(i=n)?void 0:i.errors;if(null!=a){let e=r.findIndex((e=>e.route.id&&(null==a?void 0:a[e.route.id])));e>=0||Vx(!1),r=r.slice(0,Math.min(r.length,e+1))}return r.reduceRight(((e,i,o)=>{let s=i.route.id?null==a?void 0:a[i.route.id]:null,l=null;n&&(l=i.route.errorElement||v_);let c=t.concat(r.slice(0,o+1)),u=()=>{let t;return t=s?l:i.route.Component?i_.createElement(i.route.Component,null):i.route.element?i.route.element:e,i_.createElement(w_,{match:i,routeContext:{outlet:e,matches:c,isDataRoute:null!=n},children:t})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===o)?i_.createElement(b_,{location:n.location,revalidation:n.revalidation,component:l,error:s,children:u(),routeContext:{outlet:null,matches:c,isDataRoute:!0}}):u()}),null)}(h&&h.map((e=>Object.assign({},e,{params:Object.assign({},a,e.params),pathname:dC([s,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?s:dC([s,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),o,n);return t&&p?i_.createElement(l_.Provider,{value:{location:o_({pathname:"/",search:"",hash:"",state:null,key:"default"},l),navigationType:Hx.Pop}},p):p}(t,void 0,n)}function T_(e){let{to:t,replace:n,state:i,relative:o}=e;d_()||Vx(!1);let{matches:r}=i_.useContext(c_),{pathname:a}=h_(),s=m_(),l=uC(t,cC(r).map((e=>e.pathnameBase)),a,"path"===o),c=JSON.stringify(l);return i_.useEffect((()=>s(JSON.parse(c),{replace:n,state:i,relative:o})),[s,c,o,n,i]),null}function N_(e){return function(e){let t=i_.useContext(c_).outlet;return t?i_.createElement(f_.Provider,{value:e},t):t}(e.context)}function L_(e){let{basename:t="/",children:n=null,location:i,navigationType:o=Hx.Pop,navigator:r,static:a=!1}=e;d_()&&Vx(!1);let s=t.replace(/^\/*/,"/"),l=i_.useMemo((()=>({basename:s,navigator:r,static:a})),[s,r,a]);"string"==typeof i&&(i=Zx(i));let{pathname:c="/",search:u="",hash:d="",state:h=null,key:p="default"}=i,m=i_.useMemo((()=>{let e=sC(c,s);return null==e?null:{location:{pathname:e,search:u,hash:d,state:h,key:p},navigationType:o}}),[s,c,u,d,h,p,o]);return null==m?null:i_.createElement(s_.Provider,{value:l},i_.createElement(l_.Provider,{children:n,value:m}))}var I_,D_;function H_(e){let t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:i_.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:i_.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}(D_=I_||(I_={}))[D_.pending=0]="pending",D_[D_.success=1]="success",D_[D_.error=2]="error",new Promise((()=>{})),i_.Component;const P_=window.React;function z_(){return z_=Object.assign?Object.assign.bind():function(e){for(var t=1;t0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;o=e=>({hasErrorBoundary:t(e)})}else o=$C;let r,a={},s=Qx(e.routes,o,void 0,a),l=e.basename||"/",c=Dx({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),u=null,d=new Set,h=null,p=null,m=null,f=null!=e.hydrationData,g=Xx(s,e.history.location,l),y=null;if(null==g){let t=VC(404,{pathname:e.history.location.pathname}),{matches:n,route:i}=FC(s);g=n,y={[i.id]:t}}let v,b,w=!(g.some((e=>e.route.lazy))||g.some((e=>e.route.loader))&&null==e.hydrationData),x={historyAction:e.history.action,location:e.history.location,matches:g,initialized:w,navigation:_C,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||y,fetchers:new Map,blockers:new Map},C=Hx.Pop,_=!1,S=!1,k=!1,E=[],$=[],M=new Map,R=0,A=-1,O=new Map,j=new Set,T=new Map,N=new Map,L=new Map,I=!1;function D(e){x=Dx({},x,e),d.forEach((e=>e(x)))}function H(t,n){var i,o;let a,l=null!=x.actionData&&null!=x.navigation.formMethod&&GC(x.navigation.formMethod)&&"loading"===x.navigation.state&&!0!==(null==(i=t.state)?void 0:i._isRedirect);a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:l?x.actionData:null;let c=n.loaderData?PC(x.loaderData,n.loaderData,n.matches||[],n.errors):x.loaderData,u=new Map;L.clear();let d=!0===_||null!=x.navigation.formMethod&&GC(x.navigation.formMethod)&&!0!==(null==(o=t.state)?void 0:o._isRedirect);r&&(s=r,r=void 0),S||C===Hx.Pop||(C===Hx.Push?e.history.push(t,t.state):C===Hx.Replace&&e.history.replace(t,t.state)),D(Dx({},n,{actionData:a,loaderData:c,historyAction:C,location:t,initialized:!0,navigation:_C,revalidation:"idle",restoreScrollPosition:te(t,n.matches||x.matches),preventScrollReset:d,blockers:u})),C=Hx.Pop,_=!1,S=!1,k=!1,E=[],$=[]}async function P(t,n,i){b&&b.abort(),b=null,C=t,S=!0===(i&&i.startUninterruptedRevalidation),function(e,t){if(h&&m){let n=ee(e,t);h[n]=m()}}(x.location,x.matches),_=!0===(i&&i.preventScrollReset);let c=r||s,u=i&&i.overrideNavigation,d=Xx(c,n,l);if(!d){let e=VC(404,{pathname:n.pathname}),{matches:t,route:i}=FC(c);return J(),void H(n,{matches:t,loaderData:{},errors:{[i.id]:e}})}if(x.initialized&&!k&&(f=n,(p=x.location).pathname===f.pathname&&p.search===f.search&&(""===p.hash?""!==f.hash:p.hash===f.hash||""!==f.hash))&&!(i&&i.submission&&GC(i.submission.formMethod)))return void H(n,{matches:d});var p,f;b=new AbortController;let g,y,v=LC(e.history,n,b.signal,i&&i.submission);if(i&&i.pendingError)y={[zC(d).route.id]:i.pendingError};else if(i&&i.submission&&GC(i.submission.formMethod)){let e=await async function(e,t,n,i,r){void 0===r&&(r={}),B();let s,c=function(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}(t,n);D({navigation:c});let u=XC(i,t);if(u.route.action||u.route.lazy){if(s=await NC("action",e,u,i,a,o,l),e.signal.aborted)return{shortCircuited:!0}}else s={type:Gx.error,error:VC(405,{method:e.method,pathname:t.pathname,routeId:u.route.id})};if(ZC(s)){let e;return e=r&&null!=r.replace?r.replace:s.location===x.location.pathname+x.location.search,await F(x,s,{submission:n,replace:e}),{shortCircuited:!0}}if(YC(s)){let e=zC(i,u.route.id);return!0!==(r&&r.replace)&&(C=Hx.Push),{pendingActionData:{},pendingActionError:{[e.route.id]:s.error}}}if(UC(s))throw VC(400,{type:"defer-action"});return{pendingActionData:{[u.route.id]:s.data}}}(v,n,i.submission,d,{replace:i.replace});if(e.shortCircuited)return;g=e.pendingActionData,y=e.pendingActionError,u=e_(n,i.submission),v=new Request(v.url,{signal:v.signal})}let{shortCircuited:w,loaderData:O,errors:L}=await async function(t,n,i,o,a,c,u,d,h){let p=o||e_(n,a),m=a||c||JC(p),f=r||s,[g,y]=AC(e.history,x,i,m,n,k,E,$,T,j,f,l,d,h);if(J((e=>!(i&&i.some((t=>t.route.id===e)))||g&&g.some((t=>t.route.id===e)))),0===g.length&&0===y.length){let e=G();return H(n,Dx({matches:i,loaderData:{},errors:h||null},d?{actionData:d}:{},e?{fetchers:new Map(x.fetchers)}:{})),{shortCircuited:!0}}if(!S){y.forEach((e=>{let t=x.fetchers.get(e.key),n=t_(void 0,t?t.data:void 0);x.fetchers.set(e.key,n)}));let e=d||x.actionData;D(Dx({navigation:p},e?0===Object.keys(e).length?{actionData:null}:{actionData:e}:{},y.length>0?{fetchers:new Map(x.fetchers)}:{}))}A=++R,y.forEach((e=>{M.has(e.key)&&Y(e.key),e.controller&&M.set(e.key,e.controller)}));let v=()=>y.forEach((e=>Y(e.key)));b&&b.signal.addEventListener("abort",v);let{results:w,loaderResults:C,fetcherResults:_}=await V(x.matches,i,g,y,t);if(t.signal.aborted)return{shortCircuited:!0};b&&b.signal.removeEventListener("abort",v),y.forEach((e=>M.delete(e.key)));let O=BC(w);if(O)return await F(x,O,{replace:u}),{shortCircuited:!0};let{loaderData:L,errors:I}=HC(x,i,g,C,h,y,_,N);N.forEach(((e,t)=>{e.subscribe((n=>{(n||e.done)&&N.delete(t)}))}));let P=G(),z=q(A);return Dx({loaderData:L,errors:I},P||z||y.length>0?{fetchers:new Map(x.fetchers)}:{})}(v,n,d,u,i&&i.submission,i&&i.fetcherSubmission,i&&i.replace,g,y);w||(b=null,H(n,Dx({matches:d},g?{actionData:g}:{},{loaderData:O,errors:L})))}function z(e){return x.fetchers.get(e)||SC}async function F(i,o,r){let{submission:a,replace:s,isFetchActionRedirect:c}=void 0===r?{}:r;o.revalidate&&(k=!0);let u=Ux(i.location,o.location,Dx({_isRedirect:!0},c?{_isFetchActionRedirect:!0}:{}));if(Vx(u,"Expected a location on the redirect navigation"),EC.test(o.location)&&n){let n=e.history.createURL(o.location),i=null==sC(n.pathname,l);if(t.location.origin!==n.origin||i)return void(s?t.location.replace(o.location):t.location.assign(o.location))}b=null;let d=!0===s?Hx.Replace:Hx.Push,h=a||JC(i.navigation);if(CC.has(o.status)&&h&&GC(h.formMethod))await P(d,u,{submission:Dx({},h,{formAction:o.location}),preventScrollReset:_});else if(c)await P(d,u,{overrideNavigation:e_(u),fetcherSubmission:h,preventScrollReset:_});else{let e=e_(u,h);await P(d,u,{overrideNavigation:e,preventScrollReset:_})}}async function V(t,n,i,r,s){let c=await Promise.all([...i.map((e=>NC("loader",s,e,n,a,o,l))),...r.map((t=>t.matches&&t.match&&t.controller?NC("loader",LC(e.history,t.path,t.controller.signal),t.match,t.matches,a,o,l):{type:Gx.error,error:VC(404,{pathname:t.path})}))]),u=c.slice(0,i.length),d=c.slice(i.length);return await Promise.all([qC(t,i,u,u.map((()=>s.signal)),!1,x.loaderData),qC(t,r.map((e=>e.match)),d,r.map((e=>e.controller?e.controller.signal:null)),!0)]),{results:c,loaderResults:u,fetcherResults:d}}function B(){k=!0,E.push(...J()),T.forEach(((e,t)=>{M.has(t)&&($.push(t),Y(t))}))}function W(e,t,n){let i=zC(x.matches,t);U(e),D({errors:{[i.route.id]:n},fetchers:new Map(x.fetchers)})}function U(e){let t=x.fetchers.get(e);!M.has(e)||t&&"loading"===t.state&&O.has(e)||Y(e),T.delete(e),O.delete(e),j.delete(e),x.fetchers.delete(e)}function Y(e){let t=M.get(e);Vx(t,"Expected fetch controller: "+e),t.abort(),M.delete(e)}function Z(e){for(let t of e){let e=n_(z(t).data);x.fetchers.set(t,e)}}function G(){let e=[],t=!1;for(let n of j){let i=x.fetchers.get(n);Vx(i,"Expected fetcher: "+n),"loading"===i.state&&(j.delete(n),e.push(n),t=!0)}return Z(e),t}function q(e){let t=[];for(let[n,i]of O)if(i0}function K(e){x.blockers.delete(e),L.delete(e)}function Q(e,t){let n=x.blockers.get(e)||kC;Vx("unblocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"proceeding"===t.state||"blocked"===n.state&&"unblocked"===t.state||"proceeding"===n.state&&"unblocked"===t.state,"Invalid blocker state transition: "+n.state+" -> "+t.state);let i=new Map(x.blockers);i.set(e,t),D({blockers:i})}function X(e){let{currentLocation:t,nextLocation:n,historyAction:i}=e;if(0===L.size)return;L.size>1&&Bx(!1,"A router only supports one blocker at a time");let o=Array.from(L.entries()),[r,a]=o[o.length-1],s=x.blockers.get(r);return s&&"proceeding"===s.state?void 0:a({currentLocation:t,nextLocation:n,historyAction:i})?r:void 0}function J(e){let t=[];return N.forEach(((n,i)=>{e&&!e(i)||(n.cancel(),t.push(i),N.delete(i))})),t}function ee(e,t){return p&&p(e,t.map((e=>function(e,t){let{route:n,pathname:i,params:o}=e;return{id:n.id,pathname:i,params:o,data:t[n.id],handle:n.handle}}(e,x.loaderData))))||e.key}function te(e,t){if(h){let n=ee(e,t),i=h[n];if("number"==typeof i)return i}return null}return v={get basename(){return l},get state(){return x},get routes(){return s},initialize:function(){return u=e.history.listen((t=>{let{action:n,location:i,delta:o}=t;if(I)return void(I=!1);Bx(0===L.size||null!=o,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let r=X({currentLocation:x.location,nextLocation:i,historyAction:n});return r&&null!=o?(I=!0,e.history.go(-1*o),void Q(r,{state:"blocked",location:i,proceed(){Q(r,{state:"proceeding",proceed:void 0,reset:void 0,location:i}),e.history.go(o)},reset(){let e=new Map(x.blockers);e.set(r,kC),D({blockers:e})}})):P(n,i)})),x.initialized||P(Hx.Pop,x.location),v},subscribe:function(e){return d.add(e),()=>d.delete(e)},enableScrollRestoration:function(e,t,n){if(h=e,m=t,p=n||null,!f&&x.navigation===_C){f=!0;let e=te(x.location,x.matches);null!=e&&D({restoreScrollPosition:e})}return()=>{h=null,m=null,p=null}},navigate:async function t(n,i){if("number"==typeof n)return void e.history.go(n);let o=MC(x.location,x.matches,l,c.v7_prependBasename,n,null==i?void 0:i.fromRouteId,null==i?void 0:i.relative),{path:r,submission:a,error:s}=RC(c.v7_normalizeFormMethod,!1,o,i),u=x.location,d=Ux(x.location,r,i&&i.state);d=Dx({},d,e.history.encodeLocation(d));let h=i&&null!=i.replace?i.replace:void 0,p=Hx.Push;!0===h?p=Hx.Replace:!1===h||null!=a&&GC(a.formMethod)&&a.formAction===x.location.pathname+x.location.search&&(p=Hx.Replace);let m=i&&"preventScrollReset"in i?!0===i.preventScrollReset:void 0,f=X({currentLocation:u,nextLocation:d,historyAction:p});if(!f)return await P(p,d,{submission:a,pendingError:s,preventScrollReset:m,replace:i&&i.replace});Q(f,{state:"blocked",location:d,proceed(){Q(f,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),t(n,i)},reset(){let e=new Map(x.blockers);e.set(f,kC),D({blockers:e})}})},fetch:function(t,n,u,d){if(i)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");M.has(t)&&Y(t);let h=r||s,p=MC(x.location,x.matches,l,c.v7_prependBasename,u,n,null==d?void 0:d.relative),m=Xx(h,p,l);if(!m)return void W(t,n,VC(404,{pathname:p}));let{path:f,submission:g,error:y}=RC(c.v7_normalizeFormMethod,!0,p,d);if(y)return void W(t,n,y);let v=XC(m,f);_=!0===(d&&d.preventScrollReset),g&&GC(g.formMethod)?async function(t,n,i,c,u,d){if(B(),T.delete(t),!c.route.action&&!c.route.lazy){let e=VC(405,{method:d.formMethod,pathname:i,routeId:n});return void W(t,n,e)}let h=function(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0," _hasFetcherDoneAnything ":!0}}(d,x.fetchers.get(t));x.fetchers.set(t,h),D({fetchers:new Map(x.fetchers)});let p=new AbortController,m=LC(e.history,i,p.signal,d);M.set(t,p);let f=await NC("action",m,c,u,a,o,l);if(m.signal.aborted)return void(M.get(t)===p&&M.delete(t));if(ZC(f)){M.delete(t),j.add(t);let e=t_(d);return x.fetchers.set(t,e),D({fetchers:new Map(x.fetchers)}),F(x,f,{submission:d,isFetchActionRedirect:!0})}if(YC(f))return void W(t,n,f.error);if(UC(f))throw VC(400,{type:"defer-action"});let g=x.navigation.location||x.location,y=LC(e.history,g,p.signal),v=r||s,w="idle"!==x.navigation.state?Xx(v,x.navigation.location,l):x.matches;Vx(w,"Didn't find any matches after fetcher action");let _=++R;O.set(t,_);let S=t_(d,f.data);x.fetchers.set(t,S);let[L,I]=AC(e.history,x,w,d,g,k,E,$,T,j,v,l,{[c.route.id]:f.data},void 0);I.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,n=x.fetchers.get(t),i=t_(void 0,n?n.data:void 0);x.fetchers.set(t,i),M.has(t)&&Y(t),e.controller&&M.set(t,e.controller)})),D({fetchers:new Map(x.fetchers)});let P=()=>I.forEach((e=>Y(e.key)));p.signal.addEventListener("abort",P);let{results:z,loaderResults:U,fetcherResults:Z}=await V(x.matches,w,L,I,y);if(p.signal.aborted)return;p.signal.removeEventListener("abort",P),O.delete(t),M.delete(t),I.forEach((e=>M.delete(e.key)));let G=BC(z);if(G)return F(x,G);let{loaderData:K,errors:Q}=HC(x,x.matches,L,U,void 0,I,Z,N);if(x.fetchers.has(t)){let e=n_(f.data);x.fetchers.set(t,e)}let X=q(_);"loading"===x.navigation.state&&_>A?(Vx(C,"Expected pending action"),b&&b.abort(),H(x.navigation.location,{matches:w,loaderData:K,errors:Q,fetchers:new Map(x.fetchers)})):(D(Dx({errors:Q,loaderData:PC(x.loaderData,K,w,Q)},X||I.length>0?{fetchers:new Map(x.fetchers)}:{})),k=!1)}(t,n,f,v,m,g):(T.set(t,{routeId:n,path:f}),async function(t,n,i,r,s,c){let u=x.fetchers.get(t),d=t_(c,u?u.data:void 0);x.fetchers.set(t,d),D({fetchers:new Map(x.fetchers)});let h=new AbortController,p=LC(e.history,i,h.signal);M.set(t,h);let m=await NC("loader",p,r,s,a,o,l);if(UC(m)&&(m=await KC(m,p.signal,!0)||m),M.get(t)===h&&M.delete(t),p.signal.aborted)return;if(ZC(m))return j.add(t),void(await F(x,m));if(YC(m)){let e=zC(x.matches,n);return x.fetchers.delete(t),void D({fetchers:new Map(x.fetchers),errors:{[e.route.id]:m.error}})}Vx(!UC(m),"Unhandled fetcher deferred data");let f=n_(m.data);x.fetchers.set(t,f),D({fetchers:new Map(x.fetchers)})}(t,n,f,v,m,g))},revalidate:function(){B(),D({revalidation:"loading"}),"submitting"!==x.navigation.state&&("idle"!==x.navigation.state?P(C||x.historyAction,x.navigation.location,{overrideNavigation:x.navigation}):P(x.historyAction,x.location,{startUninterruptedRevalidation:!0}))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:z,deleteFetcher:U,dispose:function(){u&&u(),d.clear(),b&&b.abort(),x.fetchers.forEach(((e,t)=>U(t))),x.blockers.forEach(((e,t)=>K(t)))},getBlocker:function(e,t){let n=x.blockers.get(e)||kC;return L.get(e)!==t&&L.set(e,t),n},deleteBlocker:K,_internalFetchControllers:M,_internalActiveDeferreds:N,_internalSetRoutes:function(e){a={},r=Qx(e,o,void 0,a)}},v}({basename:null==t?void 0:t.basename,future:z_({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:Fx({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||B_(),routes:e,mapRouteProperties:H_}).initialize()}function B_(){var e;let t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=z_({},t,{errors:W_(t.errors)})),t}function W_(e){if(!e)return null;let t=Object.entries(e),n={};for(let[i,o]of t)if(o&&"RouteErrorResponse"===o.__type)n[i]=new fC(o.status,o.statusText,o.data,!0===o.internal);else if(o&&"Error"===o.__type){let e=new Error(o.message);e.stack="",n[i]=e}else n[i]=o;return n}P_.startTransition;const U_="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Y_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Z_=P_.forwardRef((function(e,t){let n,{onClick:i,relative:o,reloadDocument:r,replace:a,state:s,target:l,to:c,preventScrollReset:u}=e,d=function(e,t){if(null==e)return{};var n,i,o={},r=Object.keys(e);for(i=0;i=0||(o[n]=e[n]);return o}(e,F_),{basename:h}=P_.useContext(s_),p=!1;if("string"==typeof c&&Y_.test(c)&&(n=c,U_))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),n=sC(t.pathname,h);t.origin===e.origin&&null!=n?c=n+t.search+t.hash:p=!0}catch(g){}let m=function(e,t){let{relative:n}=void 0===t?{}:t;d_()||Vx(!1);let{basename:i,navigator:o}=i_.useContext(s_),{hash:r,pathname:a,search:s}=g_(e,{relative:n}),l=a;return"/"!==i&&(l="/"===a?i:dC([i,a])),o.createHref({pathname:l,search:s,hash:r})}(c,{relative:o}),f=function(e,t){let{target:n,replace:i,state:o,preventScrollReset:r,relative:a}=void 0===t?{}:t,s=m_(),l=h_(),c=g_(e,{relative:a});return P_.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==i?i:Yx(l)===Yx(c);s(e,{replace:n,state:o,preventScrollReset:r,relative:a})}}),[l,s,c,i,o,n,e,r,a])}(c,{replace:a,state:s,target:l,preventScrollReset:u,relative:o});return P_.createElement("a",z_({},d,{href:n||m,onClick:p||r?i:function(e){i&&i(e),e.defaultPrevented||f(e)},ref:t,target:l}))}));var G_,q_;!function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"}(G_||(G_={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(q_||(q_={}));var K_=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(e){var t=this,n=e||function(){};return this.listeners.push(n),this.onSubscribe(),function(){t.listeners=t.listeners.filter((function(e){return e!==n})),t.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}();function Q_(){return Q_=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&e!==1/0}function tS(e){return Array.isArray(e)?e:[e]}function nS(e,t){return Math.max(e+(t||0)-Date.now(),0)}function iS(e,t,n){return mS(e)?"function"==typeof t?Q_({},n,{queryKey:e,queryFn:t}):Q_({},t,{queryKey:e}):e}function oS(e,t,n){return mS(e)?[Q_({},t,{queryKey:e}),n]:[e||{},t]}function rS(e,t){var n=e.active,i=e.exact,o=e.fetching,r=e.inactive,a=e.predicate,s=e.queryKey,l=e.stale;if(mS(s))if(i){if(t.queryHash!==sS(s,t.options))return!1}else if(!cS(t.queryKey,s))return!1;var c=function(e,t){return!0===e&&!0===t||null==e&&null==t?"all":!1===e&&!1===t?"none":(null!=e?e:!t)?"active":"inactive"}(n,r);if("none"===c)return!1;if("all"!==c){var u=t.isActive();if("active"===c&&!u)return!1;if("inactive"===c&&u)return!1}return!("boolean"==typeof l&&t.isStale()!==l||"boolean"==typeof o&&t.isFetching()!==o||a&&!a(t))}function aS(e,t){var n=e.exact,i=e.fetching,o=e.predicate,r=e.mutationKey;if(mS(r)){if(!t.options.mutationKey)return!1;if(n){if(lS(t.options.mutationKey)!==lS(r))return!1}else if(!cS(t.options.mutationKey,r))return!1}return!("boolean"==typeof i&&"loading"===t.state.status!==i||o&&!o(t))}function sS(e,t){return((null==t?void 0:t.queryKeyHashFn)||lS)(e)}function lS(e){var t;return t=tS(e),JSON.stringify(t,(function(e,t){return hS(t)?Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{}):t}))}function cS(e,t){return uS(tS(e),tS(t))}function uS(e,t){return e===t||typeof e==typeof t&&!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((function(n){return!uS(e[n],t[n])}))}function dS(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||hS(e)&&hS(t)){for(var i=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),r=o.length,a=n?[]:{},s=0,l=0;l0?this.queries.filter((function(e){return rS(n,e)})):this.queries},n.notify=function(e){var t=this;kS.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){var e=this;kS.batch((function(){e.queries.forEach((function(e){e.onFocus()}))}))},n.onOnline=function(){var e=this;kS.batch((function(){e.queries.forEach((function(e){e.onOnline()}))}))},t}(K_),AS=function(){function e(e){this.options=Q_({},e.defaultOptions,e.options),this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.observers=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0},this.meta=e.meta}var t=e.prototype;return t.setState=function(e){this.dispatch({type:"setState",state:e})},t.addObserver=function(e){-1===this.observers.indexOf(e)&&this.observers.push(e)},t.removeObserver=function(e){this.observers=this.observers.filter((function(t){return t!==e}))},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(J_).catch(J_)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var e,t=this,n="loading"===this.state.status,i=Promise.resolve();return n||(this.dispatch({type:"loading",variables:this.options.variables}),i=i.then((function(){null==t.mutationCache.config.onMutate||t.mutationCache.config.onMutate(t.state.variables,t)})).then((function(){return null==t.options.onMutate?void 0:t.options.onMutate(t.state.variables)})).then((function(e){e!==t.state.context&&t.dispatch({type:"loading",context:e,variables:t.state.variables})}))),i.then((function(){return t.executeMutation()})).then((function(n){e=n,null==t.mutationCache.config.onSuccess||t.mutationCache.config.onSuccess(e,t.state.variables,t.state.context,t)})).then((function(){return null==t.options.onSuccess?void 0:t.options.onSuccess(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(e,null,t.state.variables,t.state.context)})).then((function(){return t.dispatch({type:"success",data:e}),e})).catch((function(e){return null==t.mutationCache.config.onError||t.mutationCache.config.onError(e,t.state.variables,t.state.context,t),$S().error(e),Promise.resolve().then((function(){return null==t.options.onError?void 0:t.options.onError(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(void 0,e,t.state.variables,t.state.context)})).then((function(){throw t.dispatch({type:"error",error:e}),e}))}))},t.executeMutation=function(){var e,t=this;return this.retryer=new _S({fn:function(){return t.options.mutationFn?t.options.mutationFn(t.state.variables):Promise.reject("No mutationFn found")},onFail:function(){t.dispatch({type:"failed"})},onPause:function(){t.dispatch({type:"pause"})},onContinue:function(){t.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(e){var t=this;this.state=function(e,t){switch(t.type){case"failed":return Q_({},e,{failureCount:e.failureCount+1});case"pause":return Q_({},e,{isPaused:!0});case"continue":return Q_({},e,{isPaused:!1});case"loading":return Q_({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return Q_({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return Q_({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return Q_({},e,t.state);default:return e}}(this.state,e),kS.batch((function(){t.observers.forEach((function(t){t.onMutationUpdate(e)})),t.mutationCache.notify(t)}))},e}(),OS=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.mutations=[],n.mutationId=0,n}An(t,e);var n=t.prototype;return n.build=function(e,t,n){var i=new AS({mutationCache:this,mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0,meta:t.meta});return this.add(i),i},n.add=function(e){this.mutations.push(e),this.notify(e)},n.remove=function(e){this.mutations=this.mutations.filter((function(t){return t!==e})),e.cancel(),this.notify(e)},n.clear=function(){var e=this;kS.batch((function(){e.mutations.forEach((function(t){e.remove(t)}))}))},n.getAll=function(){return this.mutations},n.find=function(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find((function(t){return aS(e,t)}))},n.findAll=function(e){return this.mutations.filter((function(t){return aS(e,t)}))},n.notify=function(e){var t=this;kS.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var e=this.mutations.filter((function(e){return e.state.isPaused}));return kS.batch((function(){return e.reduce((function(e,t){return e.then((function(){return t.continue().catch(J_)}))}),Promise.resolve())}))},t}(K_);function jS(){return{onFetch:function(e){e.fetchFn=function(){var t,n,i,o,r,a,s,l=null==(t=e.fetchOptions)||null==(n=t.meta)?void 0:n.refetchPage,c=null==(i=e.fetchOptions)||null==(o=i.meta)?void 0:o.fetchMore,u=null==c?void 0:c.pageParam,d="forward"===(null==c?void 0:c.direction),h="backward"===(null==c?void 0:c.direction),p=(null==(r=e.state.data)?void 0:r.pages)||[],m=(null==(a=e.state.data)?void 0:a.pageParams)||[],f=gS(),g=null==f?void 0:f.signal,y=m,v=!1,b=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},w=function(e,t,n,i){return y=i?[t].concat(y):[].concat(y,[t]),i?[n].concat(e):[].concat(e,[n])},x=function(t,n,i,o){if(v)return Promise.reject("Cancelled");if(void 0===i&&!n&&t.length)return Promise.resolve(t);var r={queryKey:e.queryKey,signal:g,pageParam:i,meta:e.meta},a=b(r),s=Promise.resolve(a).then((function(e){return w(t,i,e,o)}));return wS(a)&&(s.cancel=a.cancel),s};if(p.length)if(d){var C=void 0!==u,_=C?u:TS(e.options,p);s=x(p,C,_)}else if(h){var S=void 0!==u,k=S?u:NS(e.options,p);s=x(p,S,k,!0)}else!function(){y=[];var t=void 0===e.options.getNextPageParam,n=!l||!p[0]||l(p[0],0,p);s=n?x([],t,m[0]):Promise.resolve(w([],m[0],p[0]));for(var i=function(n){s=s.then((function(i){if(!l||!p[n]||l(p[n],n,p)){var o=t?m[n]:TS(e.options,i);return x(i,t,o)}return Promise.resolve(w(i,m[n],p[n]))}))},o=1;o0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:f,isRefetching:f&&"loading"!==g,isLoadingError:"error"===g&&0===d.dataUpdatedAt,isPlaceholderData:v,isPreviousData:y,isRefetchError:"error"===g&&0!==d.dataUpdatedAt,isStale:VS(e,t),refetch:this.refetch,remove:this.remove}},n.shouldNotifyListeners=function(e,t){if(!t)return!0;var n=this.options,i=n.notifyOnChangeProps,o=n.notifyOnChangePropsExclusions;if(!i&&!o)return!0;if("tracked"===i&&!this.trackedProps.length)return!0;var r="tracked"===i?this.trackedProps:i;return Object.keys(e).some((function(n){var i=n,a=e[i]!==t[i],s=null==r?void 0:r.some((function(e){return e===n})),l=null==o?void 0:o.some((function(e){return e===n}));return a&&!l&&(!r||s)}))},n.updateResult=function(e){var t=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!function(e,t){if(e&&!t||t&&!e)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}(this.currentResult,t)){var n={cache:!0};!1!==(null==e?void 0:e.listeners)&&this.shouldNotifyListeners(this.currentResult,t)&&(n.listeners=!0),this.notify(Q_({},n,e))}},n.updateQuery=function(){var e=this.client.getQueryCache().build(this.client,this.options);if(e!==this.currentQuery){var t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}},n.onQueryUpdate=function(e){var t={};"success"===e.type?t.onSuccess=!0:"error"!==e.type||CS(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()},n.notify=function(e){var t=this;kS.batch((function(){e.onSuccess?(null==t.options.onSuccess||t.options.onSuccess(t.currentResult.data),null==t.options.onSettled||t.options.onSettled(t.currentResult.data,null)):e.onError&&(null==t.options.onError||t.options.onError(t.currentResult.error),null==t.options.onSettled||t.options.onSettled(void 0,t.currentResult.error)),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)})),e.cache&&t.client.getQueryCache().notify({query:t.currentQuery,type:"observerResultsUpdated"})}))},t}(K_);function PS(e,t){return function(e,t){return!(!1===t.enabled||e.state.dataUpdatedAt||"error"===e.state.status&&!1===t.retryOnMount)}(e,t)||e.state.dataUpdatedAt>0&&zS(e,t,t.refetchOnMount)}function zS(e,t,n){if(!1!==t.enabled){var i="function"==typeof n?n(e):n;return"always"===i||!1!==i&&VS(e,t)}return!1}function FS(e,t,n,i){return!1!==n.enabled&&(e!==t||!1===i.enabled)&&(!n.suspense||"error"!==e.state.status)&&VS(e,n)}function VS(e,t){return e.isStaleByTime(t.staleTime)}var BS=function(e){function t(t,n){return e.call(this,t,n)||this}An(t,e);var n=t.prototype;return n.bindMethods=function(){e.prototype.bindMethods.call(this),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)},n.setOptions=function(t,n){e.prototype.setOptions.call(this,Q_({},t,{behavior:jS()}),n)},n.getOptimisticResult=function(t){return t.behavior=jS(),e.prototype.getOptimisticResult.call(this,t)},n.fetchNextPage=function(e){var t;return this.fetch({cancelRefetch:null==(t=null==e?void 0:e.cancelRefetch)||t,throwOnError:null==e?void 0:e.throwOnError,meta:{fetchMore:{direction:"forward",pageParam:null==e?void 0:e.pageParam}}})},n.fetchPreviousPage=function(e){var t;return this.fetch({cancelRefetch:null==(t=null==e?void 0:e.cancelRefetch)||t,throwOnError:null==e?void 0:e.throwOnError,meta:{fetchMore:{direction:"backward",pageParam:null==e?void 0:e.pageParam}}})},n.createResult=function(t,n){var i,o,r,a,s,l,c=t.state;return Q_({},e.prototype.createResult.call(this,t,n),{fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:LS(n,null==(i=c.data)?void 0:i.pages),hasPreviousPage:IS(n,null==(o=c.data)?void 0:o.pages),isFetchingNextPage:c.isFetching&&"forward"===(null==(r=c.fetchMeta)||null==(a=r.fetchMore)?void 0:a.direction),isFetchingPreviousPage:c.isFetching&&"backward"===(null==(s=c.fetchMeta)||null==(l=s.fetchMore)?void 0:l.direction)})},t}(HS),WS=function(e){function t(t,n){var i;return(i=e.call(this)||this).client=t,i.setOptions(n),i.bindMethods(),i.updateResult(),i}An(t,e);var n=t.prototype;return n.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},n.setOptions=function(e){this.options=this.client.defaultMutationOptions(e)},n.onUnsubscribe=function(){var e;this.listeners.length||null==(e=this.currentMutation)||e.removeObserver(this)},n.onMutationUpdate=function(e){this.updateResult();var t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)},n.getCurrentResult=function(){return this.currentResult},n.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},n.mutate=function(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,Q_({},this.options,{variables:void 0!==e?e:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},n.updateResult=function(){var e=this.currentMutation?this.currentMutation.state:{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0},t=Q_({},e,{isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset});this.currentResult=t},n.notify=function(e){var t=this;kS.batch((function(){t.mutateOptions&&(e.onSuccess?(null==t.mutateOptions.onSuccess||t.mutateOptions.onSuccess(t.currentResult.data,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(t.currentResult.data,null,t.currentResult.variables,t.currentResult.context)):e.onError&&(null==t.mutateOptions.onError||t.mutateOptions.onError(t.currentResult.error,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(void 0,t.currentResult.error,t.currentResult.variables,t.currentResult.context))),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)}))}))},t}(K_),US=window.ReactDOM.unstable_batchedUpdates;kS.setBatchNotifyFunction(US);var YS=console;ES=YS;const ZS=window.React;var GS=ZS.createContext(void 0),qS=ZS.createContext(!1);function KS(e){return e&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=GS),window.ReactQueryClientContext):GS}var QS=function(){var e=ZS.useContext(KS(ZS.useContext(qS)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},XS=function(e){var t=e.client,n=e.contextSharing,i=void 0!==n&&n,o=e.children;ZS.useEffect((function(){return t.mount(),function(){t.unmount()}}),[t]);var r=KS(i);return ZS.createElement(qS.Provider,{value:i},ZS.createElement(r.Provider,{value:t},o))};const JS=window.React;var ek,tk=JS.createContext((ek=!1,{clearReset:function(){ek=!1},reset:function(){ek=!0},isReset:function(){return ek}}));function nk(e,t,n){return"function"==typeof t?t.apply(void 0,n):"boolean"==typeof t?t:!!e}const ik=window.React;function ok(e,t,n){var i=ik.useRef(!1),o=ik.useState(0)[1],r=function(e,t,n){return mS(e)?"function"==typeof t?Q_({},n,{mutationKey:e,mutationFn:t}):Q_({},t,{mutationKey:e}):"function"==typeof e?Q_({},t,{mutationFn:e}):Q_({},e)}(e,t,n),a=QS(),s=ik.useRef();s.current?s.current.setOptions(r):s.current=new WS(a,r);var l=s.current.getCurrentResult();ik.useEffect((function(){i.current=!0;var e=s.current.subscribe(kS.batchCalls((function(){i.current&&o((function(e){return e+1}))})));return function(){i.current=!1,e()}}),[]);var c=ik.useCallback((function(e,t){s.current.mutate(e,t).catch(J_)}),[]);if(l.error&&nk(void 0,s.current.options.useErrorBoundary,[l.error]))throw l.error;return Q_({},l,{mutate:c,mutateAsync:l.mutate})}const rk=window.React;function ak(e,t){var n=rk.useRef(!1),i=rk.useState(0)[1],o=QS(),r=JS.useContext(tk),a=o.defaultQueryObserverOptions(e);a.optimisticResults=!0,a.onError&&(a.onError=kS.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=kS.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=kS.batchCalls(a.onSettled)),a.suspense&&("number"!=typeof a.staleTime&&(a.staleTime=1e3),0===a.cacheTime&&(a.cacheTime=1)),(a.suspense||a.useErrorBoundary)&&(r.isReset()||(a.retryOnMount=!1));var s=rk.useState((function(){return new t(o,a)}))[0],l=s.getOptimisticResult(a);if(rk.useEffect((function(){n.current=!0,r.clearReset();var e=s.subscribe(kS.batchCalls((function(){n.current&&i((function(e){return e+1}))})));return s.updateResult(),function(){n.current=!1,e()}}),[r,s]),rk.useEffect((function(){s.setOptions(a,{listeners:!1})}),[a,s]),a.suspense&&l.isLoading)throw s.fetchOptimistic(a).then((function(e){var t=e.data;null==a.onSuccess||a.onSuccess(t),null==a.onSettled||a.onSettled(t,null)})).catch((function(e){r.clearReset(),null==a.onError||a.onError(e),null==a.onSettled||a.onSettled(void 0,e)}));if(l.isError&&!r.isReset()&&!l.isFetching&&nk(a.suspense,a.useErrorBoundary,[l.error,s.getCurrentQuery()]))throw l.error;return"tracked"===a.notifyOnChangeProps&&(l=s.trackResult(l,a)),l}function sk(e,t,n){return ak(iS(e,t,n),HS)}var lk=Symbol.for("immer-nothing"),ck=Symbol.for("immer-draftable"),uk=Symbol.for("immer-state");function dk(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var hk=Object.getPrototypeOf;function pk(e){return!!e&&!!e[uk]}function mk(e){var t;return!!e&&(gk(e)||Array.isArray(e)||!!e[ck]||!!(null==(t=e.constructor)?void 0:t[ck])||xk(e)||Ck(e))}var fk=Object.prototype.constructor.toString();function gk(e){if(!e||"object"!=typeof e)return!1;const t=hk(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===fk}function yk(e,t){0===vk(e)?Object.entries(e).forEach((([n,i])=>{t(n,i,e)})):e.forEach(((n,i)=>t(i,n,e)))}function vk(e){const t=e[uk];return t?t.type_:Array.isArray(e)?1:xk(e)?2:Ck(e)?3:0}function bk(e,t){return 2===vk(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function wk(e,t,n){const i=vk(e);2===i?e.set(t,n):3===i?e.add(n):e[t]=n}function xk(e){return e instanceof Map}function Ck(e){return e instanceof Set}function _k(e){return e.copy_||e.base_}function Sk(e,t){if(xk(e))return new Map(e);if(Ck(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&gk(e)){if(!hk(e)){const t=Object.create(null);return Object.assign(t,e)}return{...e}}const n=Object.getOwnPropertyDescriptors(e);delete n[uk];let i=Reflect.ownKeys(n);for(let o=0;o1&&(e.set=e.add=e.clear=e.delete=Ek),Object.freeze(e),t&&yk(e,((e,t)=>kk(t,!0)))),e}function Ek(){dk(2)}function $k(e){return Object.isFrozen(e)}var Mk,Rk={};function Ak(e){const t=Rk[e];return t||dk(0),t}function Ok(){return Mk}function jk(e,t){t&&(Ak("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Tk(e){Nk(e),e.drafts_.forEach(Ik),e.drafts_=null}function Nk(e){e===Mk&&(Mk=e.parent_)}function Lk(e){return Mk={drafts_:[],parent_:Mk,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ik(e){const t=e[uk];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function Dk(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[uk].modified_&&(Tk(t),dk(4)),mk(e)&&(e=Hk(t,e),t.parent_||zk(t,e)),t.patches_&&Ak("Patches").generateReplacementPatches_(n[uk].base_,e,t.patches_,t.inversePatches_)):e=Hk(t,n,[]),Tk(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==lk?e:void 0}function Hk(e,t,n){if($k(t))return t;const i=t[uk];if(!i)return yk(t,((o,r)=>Pk(e,i,t,o,r,n))),t;if(i.scope_!==e)return t;if(!i.modified_)return zk(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const t=i.copy_;let o=t,r=!1;3===i.type_&&(o=new Set(t),t.clear(),r=!0),yk(o,((o,a)=>Pk(e,i,t,o,a,n,r))),zk(e,t,!1),n&&e.patches_&&Ak("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function Pk(e,t,n,i,o,r,a){if(pk(o)){const a=Hk(e,o,r&&t&&3!==t.type_&&!bk(t.assigned_,i)?r.concat(i):void 0);if(wk(n,i,a),!pk(a))return;e.canAutoFreeze_=!1}else a&&n.add(o);if(mk(o)&&!$k(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Hk(e,o),t&&t.scope_.parent_||zk(e,o)}}function zk(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&kk(t,n)}var Fk={get(e,t){if(t===uk)return e;const n=_k(e);if(!bk(n,t))return function(e,t,n){var i;const o=Wk(t,n);return o?"value"in o?o.value:null==(i=o.get)?void 0:i.call(e.draft_):void 0}(e,n,t);const i=n[t];return e.finalized_||!mk(i)?i:i===Bk(e.base_,t)?(Yk(e),e.copy_[t]=Zk(i,e)):i},has:(e,t)=>t in _k(e),ownKeys:e=>Reflect.ownKeys(_k(e)),set(e,t,n){const i=Wk(_k(e),t);if(null==i?void 0:i.set)return i.set.call(e.draft_,n),!0;if(!e.modified_){const i=Bk(_k(e),t),a=null==i?void 0:i[uk];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((o=n)===(r=i)?0!==o||1/o==1/r:o!=o&&r!=r)&&(void 0!==n||bk(e.base_,t)))return!0;Yk(e),Uk(e)}var o,r;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==Bk(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Yk(e),Uk(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=_k(e),i=Reflect.getOwnPropertyDescriptor(n,t);return i?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:i.enumerable,value:n[t]}:i},defineProperty(){dk(11)},getPrototypeOf:e=>hk(e.base_),setPrototypeOf(){dk(12)}},Vk={};function Bk(e,t){const n=e[uk];return(n?_k(n):e)[t]}function Wk(e,t){if(!(t in e))return;let n=hk(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=hk(n)}}function Uk(e){e.modified_||(e.modified_=!0,e.parent_&&Uk(e.parent_))}function Yk(e){e.copy_||(e.copy_=Sk(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function Zk(e,t){const n=xk(e)?Ak("MapSet").proxyMap_(e,t):Ck(e)?Ak("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),i={type_:n?1:0,scope_:t?t.scope_:Ok(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=i,r=Fk;n&&(o=[i],r=Vk);const{revoke:a,proxy:s}=Proxy.revocable(o,r);return i.draft_=s,i.revoke_=a,s}(e,t);return(t?t.scope_:Ok()).drafts_.push(n),n}function Gk(e){if(!mk(e)||$k(e))return e;const t=e[uk];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Sk(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Sk(e,!0);return yk(n,((e,t)=>{wk(n,e,Gk(t))})),t&&(t.finalized_=!1),n}yk(Fk,((e,t)=>{Vk[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Vk.deleteProperty=function(e,t){return Vk.set.call(this,e,t,void 0)},Vk.set=function(e,t,n){return Fk.set.call(this,e[0],t,n,e[0])};var qk=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const i=this;return function(e=n,...o){return i.produce(e,(e=>t.call(this,e,...o)))}}let i;if("function"!=typeof t&&dk(6),void 0!==n&&"function"!=typeof n&&dk(7),mk(e)){const o=Lk(this),r=Zk(e,void 0);let a=!0;try{i=t(r),a=!1}finally{a?Tk(o):Nk(o)}return jk(o,n),Dk(i,o)}if(!e||"object"!=typeof e){if(i=t(e),void 0===i&&(i=e),i===lk&&(i=void 0),this.autoFreeze_&&kk(i,!0),n){const t=[],o=[];Ak("Patches").generateReplacementPatches_(e,i,t,o),n(t,o)}return i}dk(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,i;return[this.produce(e,t,((e,t)=>{n=e,i=t})),n,i]},"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof(null==e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){var t;mk(e)||dk(8),pk(e)&&(pk(t=e)||dk(10),e=Gk(t));const n=Lk(this),i=Zk(e,void 0);return i[uk].isManual_=!0,Nk(n),i}finishDraft(e,t){const n=e&&e[uk];n&&n.isManual_||dk(9);const{scope_:i}=n;return jk(i,t),Dk(void 0,i)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(0===i.path.length&&"replace"===i.op){e=i.value;break}}n>-1&&(t=t.slice(n+1));const i=Ak("Patches").applyPatches_;return pk(e)?i(e,t):this.produce(e,(e=>i(e,t)))}},Kk=qk.produce;qk.produceWithPatches.bind(qk);var Qk=qk.setAutoFreeze.bind(qk);qk.setUseStrictShallowCopy.bind(qk),qk.applyPatches.bind(qk),qk.createDraft.bind(qk),qk.finishDraft.bind(qk);const Xk=new Map,Jk=e=>{const t=Xk.get(e);return t?Object.fromEntries(Object.entries(t.stores).map((([e,t])=>[e,t.getState()]))):{}},eE=(e,t={})=>(n,i,o)=>{const{enabled:r,anonymousActionType:a,store:s,...l}=t;let c;try{c=null!=r&&r&&window.__REDUX_DEVTOOLS_EXTENSION__}catch(f){}if(!c)return e(n,i,o);const{connection:u,...d}=((e,t,n)=>{if(void 0===e)return{type:"untracked",connection:t.connect(n)};const i=Xk.get(n.name);if(i)return{type:"tracked",store:e,...i};const o={connection:t.connect(n),stores:{}};return Xk.set(n.name,o),{type:"tracked",store:e,...o}})(s,c,l);let h=!0;o.setState=(e,t,r)=>{const c=n(e,t);if(!h)return c;const d=void 0===r?{type:a||"anonymous"}:"string"==typeof r?{type:r}:r;return void 0===s?(null==u||u.send(d,i()),c):(null==u||u.send({...d,type:`${s}/${d.type}`},{...Jk(l.name),[s]:o.getState()}),c)};const p=(...e)=>{const t=h;h=!1,n(...e),h=t},m=e(o.setState,i,o);if("untracked"===d.type?null==u||u.init(m):(d.stores[d.store]=o,null==u||u.init(Object.fromEntries(Object.entries(d.stores).map((([e,t])=>[e,e===d.store?m:t.getState()]))))),o.dispatchFromDevtools&&"function"==typeof o.dispatch){const e=o.dispatch;o.dispatch=(...t)=>{e(...t)}}return u.subscribe((e=>{var t;switch(e.type){case"ACTION":return"string"!=typeof e.payload?void console.error("[zustand devtools middleware] Unsupported action format"):tE(e.payload,(e=>{if("__setState"!==e.type)o.dispatchFromDevtools&&"function"==typeof o.dispatch&&o.dispatch(e);else{if(void 0===s)return void p(e.state);1!==Object.keys(e.state).length&&console.error('\n [zustand devtools middleware] Unsupported __setState action format. \n When using \'store\' option in devtools(), the \'state\' should have only one key, which is a value of \'store\' that was passed in devtools(),\n and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }\n ');const t=e.state[s];if(null==t)return;JSON.stringify(o.getState())!==JSON.stringify(t)&&p(t)}}));case"DISPATCH":switch(e.payload.type){case"RESET":return p(m),void 0===s?null==u?void 0:u.init(o.getState()):null==u?void 0:u.init(Jk(l.name));case"COMMIT":return void 0===s?void(null==u||u.init(o.getState())):null==u?void 0:u.init(Jk(l.name));case"ROLLBACK":return tE(e.state,(e=>{if(void 0===s)return p(e),void(null==u||u.init(o.getState()));p(e[s]),null==u||u.init(Jk(l.name))}));case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return tE(e.state,(e=>{void 0!==s?JSON.stringify(o.getState())!==JSON.stringify(e[s])&&p(e[s]):p(e)}));case"IMPORT_STATE":{const{nextLiftedState:n}=e.payload,i=null==(t=n.computedStates.slice(-1)[0])?void 0:t.state;if(!i)return;return p(void 0===s?i:i[s]),void(null==u||u.send(null,n))}case"PAUSE_RECORDING":return h=!h}return}})),m},tE=(e,t)=>{let n;try{n=JSON.parse(e)}catch(i){console.error("[zustand devtools middleware] Could not parse the received json",i)}void 0!==n&&t(n)},nE=e=>(t,n,i)=>{const o=i.subscribe;return i.subscribe=(e,t,n)=>{let r=e;if(t){const o=(null==n?void 0:n.equalityFn)||Object.is;let a=e(i.getState());r=n=>{const i=e(n);if(!o(a,i)){const e=a;t(a=i,e)}},(null==n?void 0:n.fireImmediately)&&t(a,a)}return o(r)},e(t,n,i)},iE=e=>(t,n,i)=>(i.setState=(e,n,...i)=>{const o="function"==typeof e?Kk(e):e;return t(o,n,...i)},e(i.setState,n,i));function oE(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,i]of e)if(!Object.is(i,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let i=0;i{const n=sx(e),i=(e,i=t)=>function(e,t=e.getState,n){const i=aE(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return rE(i),i}(n,e,i);return Object.assign(i,n),i},lE=(e,t)=>e?sE(e,t):sE;Qk(!1);const cE=lE()(nE(eE(iE(((e,t)=>({settings:null,hasChanged:!1,updateSettings:t=>{e((e=>{e.settings={...e.settings,...t}}))},updateSettingsStatus:t=>{e((e=>{e.hasChanged=t}))}}))))),oE);async function uE(e,t,n){try{const i=await window.jQuery.ajax({type:"POST",url:window.yaymailData.admin_ajax.url,data:{action:"yaymail_preview_mail_for_woo",nonce:window.yaymailData.admin_ajax.nonce,template_name:e||"",search_order_id:t,email_address:n}});if(!i.success)throw new Error("Call ajax failed");return i}catch(i){throw console.error(i),i}}async function dE(){try{const e=await window.jQuery.ajax({type:"POST",url:window.yaymailData.admin_ajax.url,data:{action:"yaymail_review",nonce:window.yaymailData.admin_ajax.nonce}});if(!e.success)throw new Error("Call ajax failed");return e}catch(e){throw console.error(e),e}}async function hE(e){try{const t=await window.jQuery.ajax({type:"POST",url:window.yaymailData.admin_ajax.url,data:{action:"yaymail_change_ghf_tour",nonce:window.yaymailData.admin_ajax.nonce,next_move:e}});if(!t.success)throw new Error("Call ajax failed");return t}catch(t){throw console.error(t),t}}let pE=null,mE=null;function fE(e,t){return null!=e&&(null==t||"object"!=typeof e||Object.prototype.hasOwnProperty.call(e,t))}function gE(e,t){return JSON.stringify(e)===JSON.stringify(t)}function yE(e){return e.replace(/_/g," ")}function vE(e){return Math.round(100*(e+Number.EPSILON))/100}function bE(e){const t=[];return e.forEach((e=>{Array.isArray(e)?e.forEach((e=>{t.push(e)})):t.push(e)})),t}function wE(e){return e.toLowerCase().replace(/ /g,"-")}var xE,CE,_E,SE,kE;xE={},function(){var e={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function t(n){return function(n,i){var o,r,a,s,l,c,u,d,h,p=1,m=n.length,f="";for(r=0;r=0),s.type){case"b":o=parseInt(o,10).toString(2);break;case"c":o=String.fromCharCode(parseInt(o,10));break;case"d":case"i":o=parseInt(o,10);break;case"j":o=JSON.stringify(o,null,s.width?parseInt(s.width):0);break;case"e":o=s.precision?parseFloat(o).toExponential(s.precision):parseFloat(o).toExponential();break;case"f":o=s.precision?parseFloat(o).toFixed(s.precision):parseFloat(o);break;case"g":o=s.precision?String(Number(o.toPrecision(s.precision))):parseFloat(o);break;case"o":o=(parseInt(o,10)>>>0).toString(8);break;case"s":o=String(o),o=s.precision?o.substring(0,s.precision):o;break;case"t":o=String(!!o),o=s.precision?o.substring(0,s.precision):o;break;case"T":o=Object.prototype.toString.call(o).slice(8,-1).toLowerCase(),o=s.precision?o.substring(0,s.precision):o;break;case"u":o=parseInt(o,10)>>>0;break;case"v":o=o.valueOf(),o=s.precision?o.substring(0,s.precision):o;break;case"x":o=(parseInt(o,10)>>>0).toString(16);break;case"X":o=(parseInt(o,10)>>>0).toString(16).toUpperCase()}e.json.test(s.type)?f+=o:(!e.number.test(s.type)||d&&!s.sign?h="":(h=d?"+":"-",o=o.toString().replace(e.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",u=s.width-(h+o).length,l=s.width&&u>0?c.repeat(u):"",f+=s.align?h+o+l:"0"===c?h+l+o:l+h+o)}return f}(function(t){if(i[t])return i[t];for(var n,o=t,r=[],a=0;o;){if(null!==(n=e.text.exec(o)))r.push(n[0]);else if(null!==(n=e.modulo.exec(o)))r.push("%");else{if(null===(n=e.placeholder.exec(o)))throw new SyntaxError("[sprintf] unexpected placeholder");if(n[2]){a|=1;var s=[],l=n[2],c=[];if(null===(c=e.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=e.key_access.exec(l)))s.push(c[1]);else{if(null===(c=e.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}n[2]=s}else a|=2;if(3===a)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:n[0],param_no:n[1],keys:n[2],sign:n[3],pad_char:n[4],align:n[5],width:n[6],precision:n[7],type:n[8]})}o=o.substring(n[0].length)}return i[t]=r}(n),arguments)}function n(e,n){return t.apply(null,[e].concat(n||[]))}var i=Object.create(null);xE.sprintf=t,xE.vsprintf=n,"undefined"!=typeof window&&(window.sprintf=t,window.vsprintf=n)}(),CE={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},_E=["(","?"],SE={")":["("],":":["?","?:"]},kE=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var EE={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};var $E={contextDelimiter:"",onMissingKey:null};function ME(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},$E)this.options[n]=void 0!==t&&n in t?t[n]:$E[n]}ME.prototype.getPluralForm=function(e,t){var n,i,o,r,a,s=this.pluralForms[e];return s||("function"!=typeof(o=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(i=function(e){var t,n,i;for(t=e.split(";"),n=0;n=0||CE[o]1===e?0:1},AE=/^i18n\.(n?gettext|has_translation)(_|$)/;function OE(e){return"string"!=typeof e||""===e?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)}function jE(e){return"string"!=typeof e||""===e?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)}function TE(e,t){return function(n,i,o,r=10){const a=e[t];if(!jE(n))return;if(!OE(i))return;if("function"!=typeof o)return void console.error("The hook callback must be a function.");if("number"!=typeof r)return void console.error("If specified, the hook priority must be a number.");const s={callback:o,priority:r,namespace:i};if(a[n]){const e=a[n].handlers;let t;for(t=e.length;t>0&&!(r>=e[t-1].priority);t--);t===e.length?e[t]=s:e.splice(t,0,s),a.__current.forEach((e=>{e.name===n&&e.currentIndex>=t&&e.currentIndex++}))}else a[n]={handlers:[s],runs:0};"hookAdded"!==n&&e.doAction("hookAdded",n,i,o,r)}}function NE(e,t,n=!1){return function(i,o){const r=e[t];if(!jE(i))return;if(!n&&!OE(o))return;if(!r[i])return 0;let a=0;if(n)a=r[i].handlers.length,r[i]={runs:r[i].runs,handlers:[]};else{const e=r[i].handlers;for(let t=e.length-1;t>=0;t--)e[t].namespace===o&&(e.splice(t,1),a++,r.__current.forEach((e=>{e.name===i&&e.currentIndex>=t&&e.currentIndex--})))}return"hookRemoved"!==i&&e.doAction("hookRemoved",i,o),a}}function LE(e,t){return function(n,i){const o=e[t];return void 0!==i?n in o&&o[n].handlers.some((e=>e.namespace===i)):n in o}}function IE(e,t,n,i){return function(o,...r){const a=e[t];a[o]||(a[o]={handlers:[],runs:0}),a[o].runs++;const s=a[o].handlers;if(!s||!s.length)return n?r[0]:void 0;const l={name:o,currentIndex:0};return(i?async function(){try{a.__current.add(l);let e=n?r[0]:void 0;for(;l.currentIndex0:Array.from(i.__current).some((e=>e.name===n))}}function PE(e,t){return function(n){const i=e[t];if(jE(n))return i[n]&&i[n].runs?i[n].runs:0}}const zE=((e,t,n)=>{const i=new ME({}),o=new Set,r=()=>{o.forEach((e=>e()))},a=(e,t="default")=>{var n;i.data[t]={...i.data[t],...e},i.data[t][""]={...RE,...null==(n=i.data[t])?void 0:n[""]},delete i.pluralForms[t]},s=(e,t)=>{a(e,t),r()},l=(e="default",t,n,o,r)=>(i.data[e]||a(void 0,e),i.dcnpgettext(e,t,n,o,r)),c=(e="default")=>e,_x=(e,t,i)=>{let o=l(i,t,e);return n?(o=n.applyFilters("i18n.gettext_with_context",o,e,t,i),n.applyFilters("i18n.gettext_with_context_"+c(i),o,e,t,i)):o};if(n){const e=e=>{AE.test(e)&&r()};n.addAction("hookAdded","core/i18n",e),n.addAction("hookRemoved","core/i18n",e)}return{getLocaleData:(e="default")=>i.data[e],setLocaleData:s,addLocaleData:(e,t="default")=>{var n;i.data[t]={...i.data[t],...e,"":{...RE,...null==(n=i.data[t])?void 0:n[""],...null==e?void 0:e[""]}},delete i.pluralForms[t],r()},resetLocaleData:(e,t)=>{i.data={},i.pluralForms={},s(e,t)},subscribe:e=>(o.add(e),()=>o.delete(e)),__:(e,t)=>{let i=l(t,void 0,e);return n?(i=n.applyFilters("i18n.gettext",i,e,t),n.applyFilters("i18n.gettext_"+c(t),i,e,t)):i},_x:_x,_n:(e,t,i,o)=>{let r=l(o,void 0,e,t,i);return n?(r=n.applyFilters("i18n.ngettext",r,e,t,i,o),n.applyFilters("i18n.ngettext_"+c(o),r,e,t,i,o)):r},_nx:(e,t,i,o,r)=>{let a=l(r,o,e,t,i);return n?(a=n.applyFilters("i18n.ngettext_with_context",a,e,t,i,o,r),n.applyFilters("i18n.ngettext_with_context_"+c(r),a,e,t,i,o,r)):a},isRTL:()=>"rtl"===_x("ltr","text direction"),hasTranslation:(e,t,o)=>{var r,a;const s=t?t+""+e:e;let l=!!(null==(a=null==(r=i.data)?void 0:r[null!=o?o:"default"])?void 0:a[s]);return n&&(l=n.applyFilters("i18n.has_translation",l,e,t,o),l=n.applyFilters("i18n.has_translation_"+c(o),l,e,t,o)),l}}})(0,0,new class{constructor(){this.actions=Object.create(null),this.actions.__current=new Set,this.filters=Object.create(null),this.filters.__current=new Set,this.addAction=TE(this,"actions"),this.addFilter=TE(this,"filters"),this.removeAction=NE(this,"actions"),this.removeFilter=NE(this,"filters"),this.hasAction=LE(this,"actions"),this.hasFilter=LE(this,"filters"),this.removeAllActions=NE(this,"actions",!0),this.removeAllFilters=NE(this,"filters",!0),this.doAction=IE(this,"actions",!1,!1),this.doActionAsync=IE(this,"actions",!1,!0),this.applyFilters=IE(this,"filters",!0,!1),this.applyFiltersAsync=IE(this,"filters",!0,!0),this.currentAction=DE(this,"actions"),this.currentFilter=DE(this,"filters"),this.doingAction=HE(this,"actions"),this.doingFilter=HE(this,"filters"),this.didAction=PE(this,"actions"),this.didFilter=PE(this,"filters")}});zE.getLocaleData.bind(zE);const FE=zE.setLocaleData.bind(zE);zE.resetLocaleData.bind(zE),zE.subscribe.bind(zE);const __=zE.__.bind(zE);zE._x.bind(zE),zE._n.bind(zE),zE._nx.bind(zE),zE.isRTL.bind(zE),zE.hasTranslation.bind(zE);const VE=window.React.useEffect,BE=window.React.useState;function WE(e,t,n,i){const[o,r]=BE(null);return VE((()=>{const o=window.wp.media({id:e,title:__("Select a media","yaymail"),library:{type:i??"image"},button:{text:__("Use this image","yaymail")},multiple:!!fE(n)&&n});o.on("select",(()=>{const e=o.state().get("selection").first(),n=e.toJSON().url;t(n,e)})),r(o)}),[n,t,e]),VE((()=>()=>{window.jQuery(`#${e}`).closest('[id^="__wp-uploader-id"]').remove(),window.jQuery('button[type="button"].browser').remove()}),[]),{mediaUploader:o}}const UE=(e,t="px")=>`${e}${t}`,YE=(e,t)=>{if(null!=t)return t.split(".").reduce(((e,t)=>null==e?void 0:e[t]),e)},ZE=(e,t,n)=>{if(null==t)return;const i=t.split(".");i.reduce(((e,t,o)=>{if(o!==i.length-1)return null==(null==e?void 0:e[t])&&(e[t]={}),e[t];e[t]=n}),e)},GE=(e,t)=>e.replace(/{{(.*?)}}|\[\[(.*?)\]\]/g,((e,n,i)=>{const o=(n||i).trim();if(Object.prototype.hasOwnProperty.call(t,o)){if("show_product_item_cost"===o){let e=t[o];return"true"===e?e=!0:"false"===e&&(e=!1),Boolean(e)?"3":"2"}return t[o]}return e}));function qE(e,t){return null!=e&&(null==t||"object"!=typeof e||Object.prototype.hasOwnProperty.call(e,t))}function KE(e){var t,n,i,o;return void 0===e||void 0===e.side||void 0===e.width||"none"===(null==e?void 0:e.side)?{}:"top"===(null==e?void 0:e.side)?{borderTop:`${null==e?void 0:e.width}px ${null==e?void 0:e.style} ${null==e?void 0:e.color}`}:"right"===(null==e?void 0:e.side)?{borderRight:`${null==e?void 0:e.width}px ${null==e?void 0:e.style} ${null==e?void 0:e.color}`}:"bottom"===(null==e?void 0:e.side)?{borderBottom:`${null==e?void 0:e.width}px ${null==e?void 0:e.style} ${null==e?void 0:e.color}`}:"left"===(null==e?void 0:e.side)?{borderLeft:`${null==e?void 0:e.width}px ${null==e?void 0:e.style} ${null==e?void 0:e.color}`}:"custom"===(null==e?void 0:e.side)?{borderTop:`${null==(t=null==e?void 0:e.custom)?void 0:t.top}px ${null==e?void 0:e.style} ${null==e?void 0:e.color}`,borderRight:`${null==(n=null==e?void 0:e.custom)?void 0:n.right}px ${null==e?void 0:e.style} ${null==e?void 0:e.color}`,borderBottom:`${null==(i=null==e?void 0:e.custom)?void 0:i.bottom}px ${null==e?void 0:e.style} ${null==e?void 0:e.color}`,borderLeft:`${null==(o=null==e?void 0:e.custom)?void 0:o.left}px ${null==e?void 0:e.style} ${null==e?void 0:e.color}`}:{border:`${null==e?void 0:e.width}px ${null==e?void 0:e.style} ${null==e?void 0:e.color}`}}let QE;const XE=new Uint8Array(16);function JE(){if(!QE&&(QE="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!QE))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return QE(XE)}const e$=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,t$=[];for(let e=0;e<256;++e)t$.push((e+256).toString(16).slice(1));const n$={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function i$(e,t,n){if(n$.randomUUID&&!t&&!e)return n$.randomUUID();const i=(e=e||{}).random||(e.rng||JE)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=i[e];return t}return function(e,t=0){return(t$[e[t+0]]+t$[e[t+1]]+t$[e[t+2]]+t$[e[t+3]]+"-"+t$[e[t+4]]+t$[e[t+5]]+"-"+t$[e[t+6]]+t$[e[t+7]]+"-"+t$[e[t+8]]+t$[e[t+9]]+"-"+t$[e[t+10]]+t$[e[t+11]]+t$[e[t+12]]+t$[e[t+13]]+t$[e[t+14]]+t$[e[t+15]]).toLowerCase()}(i)}const o$="yaymail-customizer-element-nested-column-content",r$="yaymail-sortable-elements-container",a$="yaymail-customizer-sidebar-element__disabled",s$=(e,t)=>{for(const n of t){if(n.id===e)return n;if(n.children&&n.children.length>0){const t=s$(e,n.children);if(t)return t}}return null},l$=(e,t)=>{for(const n of t){if(n.id===e)return n;if(n.children&&n.children.length>0){if(n.children.find((t=>t.id===e)))return n;const t=l$(e,n.children);if(t)return t}}return null},c$=(e,t,n)=>{for(let i=0;i0&&c$(e,t[i].children,n))return!0}return!1},u$=(e,t)=>structuredClone(t).filter((t=>!e.includes(t.id))).map((t=>({...t,...t.children?{children:u$(e,t.children)}:{}}))),d$=(e,t)=>{const n=structuredClone(t),i=[];let o=0;return n.forEach(((t,r)=>{e.includes(t.id)&&(i.push(x$(t)),o=r+1),null!=t.children&&(n[r].children=d$(e,t.children))})),n.splice(o,0,...i),n},h$=(e,t,n)=>{if(null==n)return!1;for(let i=0;i0&&h$(e,t[i].children,n))return!0}return!1},p$=(e,t)=>{if(e.from!==e.to)return null;if(void 0===e.newIndex)return console.debug("YayMail: Could not detect sortable new index"),null;let n=structuredClone(t);return n=(({array:e,oldIndex:t,newIndex:n})=>{if(t<0||t>=e.length||n<0||n>=e.length)throw new Error("Invalid index");if(t===n)return e;const i=[...e],[o]=i.splice(t,1);return i.splice(n,0,o),i})({array:n,oldIndex:e.oldIndex??0,newIndex:e.newIndex??0}),n},m$=e=>{if(!e||!e.data)return e;const t=Object.values(e.data).some((e=>null!=e.value_path));"column"===e.type&&(e.id=i$());const n={...e,data:Object.fromEntries(Object.entries(e.data).filter((([e,n])=>!t||null!=n.value_path)).map((([e,t])=>[e,(null==t?void 0:t.default_value)??t]))),children:qE(e.children)&&e.children.length>0?e.children.map((e=>m$(e))):e.children};return window.yaymailData.yaymailHooks.applyFilters("yaymail_reduced_element_data_before_add",n)},f$=(e,t,n,i)=>{if(!e.item.dataset.yaymailElementId)return console.debug("YayMail: Please provide Element data in data attribute"),null;if(!qE(e.from.classList)||!qE(e.to.classList))return console.debug("YayMail: Could not detect source/target"),null;const o=e.item.dataset.yaymailElementType,r="true"===e.item.dataset.yaymailElementIsPattern;if(!o&&!r)return console.debug("YayMail: Please provide element data attribute: type"),null;const a=e.item.dataset.yaymailElementId;if(!a)return console.debug("YayMail: Please provide element data attribute: id"),null;const s=hM.getState().elements.find((e=>e.type===o));if(!(r||s&&s.available))return console.debug("YayMail: Invalid element type"),null;const l=e.to.classList.contains(o$),c=e.to.classList.contains("yaymail-customizer-element-container-children"),u=e.from.classList.contains(r$);let d=structuredClone(t);if(r){let t=window.yaymailData.builder.patterns.find((e=>e.type===o)),n=null==t?void 0:t.name;if(null==t)return console.debug("YayMail: Cannot find pattern from window variable!"),null;const i=t.elements;if(l&&i.some((e=>"column_layout"===e.type)))return null;let r=i.map((e=>x$(m$(e))));return d.splice(e.newIndex??d.length,0,...r),{addedList:d,addedElementName:n??""}}let h=null;if(h=u?hM.getState().elements.find((e=>e.id===a))??null:s$(a,t),!h)return console.debug("YayMail: Failed to get element data"),null;delete h.parentId,d=u$([h.id],d);const p="string"==typeof(m=h.id)&&e$.test(m)?h.id:i$();var m;if(h=m$(h),l){if("column_layout"===o)return null;if(!qE(n)||!qE(i))return console.debug("YayMail: Undefined parentId or columnIndex"),null;const t=s$(n,d);if(!t||!t.children)return null;h={...h,id:p,parentId:t.children[i].id},null==t.children[i].children&&(t.children[i].children=[]);const r=structuredClone(t.children[i].children);null==r||r.splice(e.newIndex??r.length,0,h),t.children[i].children=r}else if(c){if(!qE(n))return console.debug("YayMail: Undefined parentId for container"),null;const t=s$(n,d);if(!t)return null;h={...h,id:p,parentId:t.id},null==t.children&&(t.children=[]);const i=structuredClone(t.children);null==i||i.splice(e.newIndex??i.length,0,h),t.children=i}else h={...h,id:p},d.splice(e.newIndex??d.length,0,h);return{addedList:d,addedElementName:h.name??""}},g$=(e,t)=>{var n;if("image_box"===e||"image_list"===e||"text_list"===e)return Object.entries(t).reduce(((e,[t,n])=>(n&&"object"==typeof n&&"type"in n&&"style"===n.type&&(e[t]=n),e)),{});const i=null==(n=hM.getState().elements.find((t=>t.type===e)))?void 0:n.data;return Object.entries(i||{}).reduce(((e,[n,i])=>(i&&"object"==typeof i&&"type"in i&&"style"===i.type&&n in t&&(e[n]=t[n]),e)),{})},y$=(e,t="px")=>`${e}${t}`,v$=e=>e.reduce(((e,t)=>{const n={name:t.name,description:t.description,attributes:t.attributes};return t.group in e?e[t.group].shortcodes.push(n):""!==t.group&&(e[t.group]={groupLabel:t.group.replaceAll("_"," "),shortcodes:[n]}),e}),{}),b$=e=>e?e.map((e=>({...e,icon:"",...e.children?{children:b$(e.children)}:{}}))):[],w$=(e,t)=>{const n=s$(e,t);return"container"===(null==n?void 0:n.type)?n:n?l$(n.id,t):null};function x$(e,t){const n=structuredClone(e);return n.id=i$(),n.parentId=null!=t?t.id:void 0,null==n.children||n.children.length<1||(n.children=n.children.map((e=>x$(e,n)))),n}var C$={exports:{}};!function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],i=0;i=t||n<0||d&&e-c>=r}function f(){var e=L$();if(m(e))return g(e);s=setTimeout(f,function(e){var n=t-(e-l);return d?N$(n,r-(e-c)):n}(e))}function g(e){return s=void 0,h&&i?p(e):(i=o=void 0,a)}function y(){var e=L$(),n=m(e);if(i=arguments,o=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(f,t),u?p(e):a}(l);if(d)return s=setTimeout(f,t),p(l)}return void 0===s&&(s=setTimeout(f,t)),a}return t=D$(t)||0,I$(n)&&(u=!!n.leading,r=(d="maxWait"in n)?T$(D$(n.maxWait)||0,t):r,h="trailing"in n?!!n.trailing:h),y.cancel=function(){void 0!==s&&clearTimeout(s),c=0,i=l=o=s=void 0},y.flush=function(){return void 0===s?a:g(L$())},y};const P$=ve(H$),z$=window.React.useCallback,F$=window.React.useMemo,V$=window.React.useState,B$=({colorType:e,initialValue:t,editorId:n,onChange:i})=>{const[o,r]=V$(t),a=F$((()=>window.tinymce.get(n)),[n]),s=P$((t=>{const o=window.tinymce.get(n);if(o){const n=t.toHexString();r(n),o.execCommand(e,!1,n),i(o.getContent())}}),200),l=z$((t=>{t.stopPropagation(),a.execCommand(e,!1,o),i(a.getContent())}),[a,o]);return Mn.jsx(eg,{className:"yaymail-color-picker-wrapper",defaultValue:o,onChange:s,children:Mn.jsxs("div",{className:"mce-widget mce-btn mce-splitbtn mce-colorbutton",role:"button","aria-haspopup":"true","aria-label":"Background color",children:[Mn.jsxs("button",{role:"presentation",type:"button",onClick:l,children:[Mn.jsx("i",{className:_$("mce-ico","ForeColor"===e?"mce-i-forecolor":"mce-i-backcolor")}),Mn.jsx("span",{className:"mce-preview",style:{background:o}})]}),Mn.jsx("button",{type:"button",className:"mce-open",children:Mn.jsx("i",{className:"mce-caret"})})]})})},W$=window.React.useCallback,U$=window.React.useEffect,Y$=window.React.useMemo,Z$=e=>{const t=Y$((()=>e.id),[e.id]),n=Y$((()=>(null==e?void 0:e.title)??__("Content","yaymail")),[null==e?void 0:e.title]),i=Y$((()=>null==e?void 0:e.description),[null==e?void 0:e.description]),o=Y$((()=>null==e?void 0:e.value),[null==e?void 0:e.value]),r=hM((e=>e.shortcodes)),a=W$((t=>{var n;return null==(n=e.onChange)?void 0:n.call(e,t)}),[e.onChange]),s=W$(((e,n)=>{const i=window.tinymce.get(t);if(e&&(null==n?void 0:n.attributes)){const{width:t,height:o,alt:r}=n.attributes,a=`${r}`;i.execCommand("mceInsertContent",!1,a)}}),[t]),{mediaUploader:l}=WE("yaymail-rich-text-editor-image-uploader",s),c=e.customButtonsRenderer??W$((e=>[{id:"shortcodeList",type:"menubutton",text:__("Shortcode","yaymail"),icon:!1,menu:Object.values(v$(r)).filter((e=>"none"!==e.groupLabel)).map((t=>({text:t.groupLabel,menu:t.shortcodes.map((t=>({text:t.description,onclick:function(){const n=`[${t.name}]`;e.insertContent(n),a(e.getContent())}})))})))}]),[r,a]);return U$((()=>{let e;return window.wp.editor.initialize(t,{tinymce:{toolbar1:"undo redo | styleselect | bold italic underline fontsizeselect | customforecolor custombackcolor hr alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link | mediaImageLibrary | mediaimagelibrary fullscreen shortcodeList",style_formats_merge:!0,style_formats:[{title:"Font Weights",items:[{title:"Light (300)",inline:"span",styles:{"font-weight":"300"}},{title:"Normal (400)",inline:"span",styles:{"font-weight":"400"}},{title:"Medium (500)",inline:"span",styles:{"font-weight":"500"}},{title:"Semi Bold (600)",inline:"span",styles:{"font-weight":"600"}},{title:"Bold (700)",inline:"span",styles:{"font-weight":"700"}},{title:"Extra Bold (800)",inline:"span",styles:{"font-weight":"800"}}]}],forced_root_block:"div",plugins:["searchreplace","code","visualblocks","fullscreen","image","link","table","charmap","hr","insertdatetime","textcolor","lists"],menu:{file:{title:"File",items:"newdocument"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualblocks | fullscreen"},insert:{title:"Insert",items:"image link inserttable | charmap hr | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | blockformats align | removeformat"},tools:{title:"Tools",items:"code"},table:{title:"Table",items:"inserttable tableprops deletetable row column | cell"}},menubar:"file edit view insert format tools table",directionality:window.yaymailData.is_rtl?"rtl":"ltr",fontsize_formats:"8px 9px 10px 11px 12px 13px 14px 15px 16px 18px 20px 24px 30px 36px 40px",content_style:'body {\n font-size: 14px;\n font-family: "Helvetica Neue",Helvetica,Roboto,Arial,sans-serif ;\n }\n p {\n margin: 0px;\n }',setup:n=>{n.on("keyup ExecCommand change",(()=>{a(n.getContent())})),n.addButton("mediaimagelibrary",{text:__("Media Image Library","yaymail"),onclick:()=>{null==l||l.open()}}),c(n).forEach((e=>{n.addButton(e.id,e)})),n.addButton("customforecolor",{id:`yaymail-editor-custom-fore-color_${t}`,tooltip:"Text color"}),n.addButton("custombackcolor",{id:`yaymail-editor-custom-back-color_${t}`,tooltip:"Background color"}),e=setTimeout((()=>{const e=(e,t)=>{const n=document.getElementById(e);n&&window.ReactDOM.render(t,n)};t&&(e(`yaymail-editor-custom-fore-color_${t}`,Mn.jsx(B$,{colorType:"ForeColor",initialValue:"#636363",editorId:t,onChange:a})),e(`yaymail-editor-custom-back-color_${t}`,Mn.jsx(B$,{colorType:"BackColor",initialValue:"#636363",editorId:t,onChange:a})))}),100)}}}),()=>{window.wp.editor.remove(t),clearTimeout(e)}}),[l,a,c,t]),Mn.jsxs("div",{className:e.className?e.className:"yaymail-editor-property yaymail-editor-property-rich-text",children:[n&&Mn.jsx("div",{className:"yaymail-title",children:n}),i&&Mn.jsx("div",{className:"yaymail-editor-property-description",dangerouslySetInnerHTML:{__html:i}}),Mn.jsx("textarea",{id:t,defaultValue:o,style:{fontSize:"14px"}})]},t)};function G$(e,t,n){return function(e,t,n){const i=t<0?e.length+t:t;if(i>=0&&i{X$.getState().pushNewChange(eM.getState().list,e)},K$=P$(q$,200),Q$={hasUndo:!1,hasRedo:!1,changes:[],timeTravelingIndex:0,isAfterUndoRedo:!1},X$=lE()(nE(eE(iE(((e,t)=>({...Q$,pushNewChange:(n,i)=>{t().isAfterUndoRedo||null!=i&&e((e=>{const o={data:n,info:i??null};if(e.changes.length>=50&&e.changes.splice(1,1),null!==e.timeTravelingIndex&&e.timeTravelingIndex{var t;return"initialized"===(null==(t=e.info)?void 0:t.action)})))e.changes=[];else if(t().changes.length>0)return;e.changes.push(o),e.timeTravelingIndex=e.changes.length-1}))},setTimeTravelingIndex:t=>{e((e=>{e.timeTravelingIndex=t}))},setHasUndo:t=>{e((e=>{e.hasUndo=t}))},setHasRedo:t=>{e((e=>{e.hasRedo=t}))},undo:()=>{null!==t().timeTravelingIndex&&t().timeTravelingIndex>0&&e((e=>{e.timeTravelingIndex--,e.isAfterUndoRedo=!0}))},redo:()=>{null!==t().timeTravelingIndex&&t().timeTravelingIndex{e.timeTravelingIndex++,e.isAfterUndoRedo=!0}))},setIsAfterUndoRedo:t=>{e((e=>{e.isAfterUndoRedo=t}))},jumpToChange:t=>{e((e=>{e.timeTravelingIndex=t,e.isAfterUndoRedo=!0}))},reset:()=>{e(Q$)}}))))),oE);X$.subscribe((e=>e.timeTravelingIndex),(e=>{var t;const n=X$.getState().changes;if(X$.getState().setHasUndo(Boolean(e)),X$.getState().setHasRedo(Boolean(null!==e&&e({list:[],chosenElement:null,copiedElement:null,copiedStylesElement:null,hasChanged:!1,isDiscardChangesConfirmModalDisplayed:!1,navigatingPath:null,multiSelectedList:[],lastChosenElement:null,specialEditorScreen:null,setSpecialEditorScreen:t=>{e((e=>{e.specialEditorScreen=t}))},updateList:(t,n)=>{e((e=>{e.list=t})),null!=n&&q$(n)},chooseElement:n=>e((e=>{e.chosenElement=n;let i=n;n.parentId&&(i=w$(n.parentId,t().list)),e.lastChosenElement=i})),deMultiSelect:()=>e((e=>{e.multiSelectedList=[],e.lastChosenElement=null})),unchooseElement:()=>e((()=>({chosenElement:null}))),changeContentStatus:t=>e((()=>({hasChanged:t}))),updateChosenElementData:(n,i)=>{var o;e((e=>{var t;n((null==(t=e.chosenElement)?void 0:t.data)??{})})),null!=i.attribute&&K$({...i,action:"edited",elementName:(null==(o=t().chosenElement)?void 0:o.name)??""})},updateChosenElementChildren:(n,i)=>{var o;e((e=>{var t;n(null==(t=e.chosenElement)?void 0:t.children)})),K$({...i,action:"edited",elementName:(null==(o=t().chosenElement)?void 0:o.name)??""})},swapWithPreviousElement:n=>{var i;const o=t().list,r=o.findIndex((e=>e.id===n));if(r>0&&r({list:n}))),q$({action:"moved",elementName:(null==(i=t().chosenElement)?void 0:i.name)??""})}},swapWithNextElement:n=>{var i;const o=t().list,r=o.findIndex((e=>e.id===n));if(r>=0&&r({list:n}))),q$({action:"moved",elementName:(null==(i=t().chosenElement)?void 0:i.name)??""})}},swapGroupWithPreviousElement:n=>{const i=t().list,o=i.findIndex((e=>e.id===n[0].id));if(o>0&&o{const n=i.findIndex((t=>t.id===e.id));t=G$(t,n,n-1)})),e((()=>({list:t}))),q$({action:"moved",elementName:__("Group","yaymail")})}},swapGroupWithNextElement:n=>{const i=t().list,o=i.findIndex((e=>e.id===n[0].id));if(o>=0&&o{const n=i.findIndex((t=>t.id===e.id));t=G$(t,n,n+1)})),e((()=>({list:t}))),q$({action:"moved",elementName:__("Group","yaymail")})}},duplicateElement:()=>{const n=t().chosenElement,i=t().multiSelectedList,o=i.length>1;let r=[];if(r=o?i.map((e=>e.id)):(null==n?void 0:n.id)?[n.id]:[],r.length<1)return;const a=d$(r,t().list);e((e=>{e.list=a})),q$({action:"duplicated",elementName:o?"Pattern":(null==n?void 0:n.name)??"Element"})},copyElement:t=>e((()=>({copiedElement:t}))),pasteElement:()=>{const n=t().chosenElement,i=t().copiedElement;if(!(n&&i&&n.id&&i.id))return;const o=structuredClone(t().list);h$(null==n?void 0:n.id,o,i)&&(e((e=>{e.list=o})),q$({action:"pasted",elementName:i.name}))},copyStylesElement:()=>{const n=structuredClone(t().chosenElement);if(null===n)return;const i={...n};if("image_box"===i.type||"image_list"===i.type||"text_list"===i.type){const e=Object.entries(i.data).map((([e,t])=>{if("image_box"===e||"image_list"===e||"text_list"===e){const n=(null==t?void 0:t.default_value)??t;return n.column_1&&(n.column_1=g$(e,n.column_1)),n.column_2&&(n.column_2=g$(e,n.column_2)),n.column_3&&(n.column_3=g$(e,n.column_3)),[e,n]}return[e,(null==t?void 0:t.default_value)??t]}));i.data=Object.fromEntries(e)}else i.data=g$(i.type,i.data);e((e=>{e.copiedStylesElement=i}))},pasteStylesElement:()=>{const n=structuredClone(t().chosenElement),i=structuredClone(t().copiedStylesElement);null!==i&&null!=n&&("image_box"!==i.type&&"image_list"!==i.type&&"text_list"!==i.type||(i.data.number_column&&delete i.data.number_column,i.data[i.type].column_1&&(i.data[i.type].column_1={...n.data[i.type].column_1,...i.data[i.type].column_1}),i.data[i.type].column_2&&(i.data[i.type].column_2={...n.data[i.type].column_2,...i.data[i.type].column_2}),i.data[i.type].column_3&&(i.data[i.type].column_3={...n.data[i.type].column_3,...i.data[i.type].column_3})),e((e=>{null!==e.chosenElement&&(e.chosenElement.data={...n.data,...i.data})})),q$({action:"pasted_styles",elementName:i.name}))},removeElements:n=>{var i;if(!n)return;const o=u$(n,t().list);e((e=>{e.list=o})),t().deMultiSelect(),q$({action:"removed",elementName:(null==(i=t().chosenElement)?void 0:i.name)??""}),t().unchooseElement()},removeAllElements:n=>{e(n?e=>{e.list=t().list.filter((e=>n.includes(e.type)))}:e=>{e.list=[]}),q$({action:"removed",elementName:"All Elements"}),t().unchooseElement()},changeListBackgroundColor:t=>{e((e=>{e.list.forEach((e=>{e.data.background_color&&(e.data.background_color=t)})),K$({elementName:"Content background",action:"edited"})}))},changeListTextColor:t=>{e((e=>{e.list.forEach((e=>{e.data.text_color&&(e.data.text_color=t)}))})),K$({elementName:"Content text color",action:"edited"})},changeListTitleColor:t=>{e((e=>{e.list.forEach((e=>{e.data.title_color&&(e.data.title_color=t)})),K$({elementName:"Title",action:"edited"})}))},clearNavigatingPath:()=>{e((e=>{e.navigatingPath=null}))},displayDiscardChangesConfirmModal:t=>{e((e=>{e.isDiscardChangesConfirmModalDisplayed=!0,e.navigatingPath=t}))},hideDiscardChangesConfirmModal:()=>{e((e=>{e.isDiscardChangesConfirmModalDisplayed=!1,e.navigatingPath=null}))},selectParentColumnElement:n=>{if(!n)return;const i=w$(n,t().list);i&&e((e=>{e.chosenElement=i}))},multiSelect:n=>{var i;const o=n.id;let r=-1,a=-1;const s=t().list;for(let e=0;e{e.multiSelectedList=u.find((e=>"skeleton_divider"===e.type))?[]:u}))},setMultiSelectedList:t=>{e((e=>{e.multiSelectedList=t}))}}))))),oE),eM=J$,tM=window.React.useCallback,nM=window.React.useRef,iM=()=>{const e=m_(),t=eM((e=>e.hasChanged)),n=eM((e=>e.displayDiscardChangesConfirmModal)),i=nM((()=>{}));return tM((o=>{t?n(o):(o&&e(o),i.current())}),[t,n,e,i.current])};function oM(){const e=iM();return()=>{e("/customizer/?template=yaymail_global_header_footer")}}const rM=window.React.useCallback,aM={content_override:!1,footer_content:"",hidden:!1};function sM(){const e=hM((e=>{var t;return null==(t=e.templateData)?void 0:t.global_footer_settings})),t=hM((e=>e.updateTemplateSettingsObject)),n=hM((e=>e.hideTemplateGlobalFooter)),i=eM((e=>e.changeContentStatus)),o=oM(),r=rM((e=>{t((t=>{var n;(null==(n=t.templateData)?void 0:n.global_footer_settings)?t.templateData.global_footer_settings.footer_content=e:t.templateData.global_footer_settings={...aM,footer_content:e}})),i(!0)}),[]),a=rM((e=>{t((t=>{var n;(null==(n=t.templateData)?void 0:n.global_footer_settings)?t.templateData.global_footer_settings.content_override=e:t.templateData.global_footer_settings={...aM,content_override:e}})),i(!0)}),[]),s=rM((e=>{n(e),i(!0)}),[]);return Mn.jsxs("div",{children:[Mn.jsx("div",{className:_$("yaymail-editor-property","yaymail-editor-global-footer-link"),children:Mn.jsxs("div",{className:"yaymail-title",children:[__("This is the Global footer element, you can customize it by go to ","yaymail"),Mn.jsx("a",{onClick:o,children:__("Global footer","yaymail")})]})}),Mn.jsx("div",{className:_$("yaymail-editor-property","yaymail-editor-global-footer-display"),children:Mn.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,justifyContent:"space-between"},children:[Mn.jsx("div",{className:"yaymail-title",style:{marginBottom:0},children:__("Hide on this template","yaymail")}),Mn.jsx(ww,{checkedChildren:Mn.jsx("span",{className:"yaymail-setting-switch-label",children:__("yes","yaymail")}),checked:null==e?void 0:e.hidden,onChange:s,unCheckedChildren:Mn.jsx("span",{className:"yaymail-setting-switch-label",children:__("no","yaymail")})})]})}),!(null==e?void 0:e.hidden)&&Mn.jsxs(Mn.Fragment,{children:[Mn.jsx("div",{className:_$("yaymail-editor-property","yaymail-editor-global-footer-override-content"),children:Mn.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,justifyContent:"space-between"},children:[Mn.jsx("div",{className:"yaymail-title",style:{marginBottom:0},children:__("Override content","yaymail")}),Mn.jsx(ww,{checkedChildren:Mn.jsxs("span",{className:"yaymail-setting-switch-label",children:[" ",__("on","yaymail")," "]}),checked:null==e?void 0:e.content_override,onChange:a,unCheckedChildren:Mn.jsx("span",{className:"yaymail-setting-switch-label",children:__("off","yaymail")})})]})}),(null==e?void 0:e.content_override)&&Mn.jsx("div",{className:_$("yaymail-editor-property","yaymail-editor-global-footer-footer"),children:Mn.jsx(Z$,{value:null==e?void 0:e.footer_content,id:"global_footer_footer_content",title:__("Footer content","yaymail"),description:__("This will change the content of all Footer elements in Global Footer section.","yaymail"),onChange:r})})]})]})}const lM=window.React.useCallback,cM={content_override:!1,heading_content:"",hidden:!1};function uM(){const e=hM((e=>{var t;return null==(t=e.templateData)?void 0:t.global_header_settings})),t=hM((e=>e.updateTemplateSettingsObject)),n=hM((e=>e.hideTemplateGlobalHeader)),i=eM((e=>e.changeContentStatus)),o=oM(),r=lM((e=>{t((t=>{var n;(null==(n=t.templateData)?void 0:n.global_header_settings)?t.templateData.global_header_settings.heading_content=e:t.templateData.global_header_settings={...cM,heading_content:e}})),i(!0)}),[]),a=lM((e=>{t((t=>{var n;(null==(n=t.templateData)?void 0:n.global_header_settings)?t.templateData.global_header_settings.content_override=e:t.templateData.global_header_settings={...cM,content_override:e}})),i(!0)}),[]),s=lM((e=>{n(e),i(!0)}),[]);return Mn.jsxs("div",{children:[Mn.jsx("div",{className:_$("yaymail-editor-property","yaymail-editor-global-header-link"),children:Mn.jsxs("div",{className:"yaymail-title",children:[__("This is the Global header element, you can customize it by go to ","yaymail"),Mn.jsx("a",{onClick:o,children:__("Global header","yaymail")})]})}),Mn.jsx("div",{className:_$("yaymail-editor-property","yaymail-editor-global-header-display"),children:Mn.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,justifyContent:"space-between"},children:[Mn.jsx("div",{className:"yaymail-title",style:{marginBottom:0},children:__("Hide on this template","yaymail")}),Mn.jsx(ww,{checkedChildren:Mn.jsx("span",{className:"yaymail-setting-switch-label",children:__("yes","yaymail")}),checked:null==e?void 0:e.hidden,onChange:s,unCheckedChildren:Mn.jsx("span",{className:"yaymail-setting-switch-label",children:__("no","yaymail")})})]})}),!(null==e?void 0:e.hidden)&&Mn.jsxs(Mn.Fragment,{children:[Mn.jsx("div",{className:_$("yaymail-editor-property","yaymail-editor-global-header-override-content"),children:Mn.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,justifyContent:"space-between"},children:[Mn.jsx("div",{className:"yaymail-title",style:{marginBottom:0},children:__("Override content","yaymail")}),Mn.jsx(ww,{checkedChildren:Mn.jsxs("span",{className:"yaymail-setting-switch-label",children:[" ",__("on","yaymail")," "]}),checked:null==e?void 0:e.content_override,onChange:a,unCheckedChildren:Mn.jsx("span",{className:"yaymail-setting-switch-label",children:__("off","yaymail")})})]})}),(null==e?void 0:e.content_override)&&Mn.jsx("div",{className:_$("yaymail-editor-property","yaymail-editor-global-header-heading"),children:Mn.jsx(Z$,{value:null==e?void 0:e.heading_content,id:"global_header_heading_content",title:__("Email Heading content","yaymail"),description:__("This will change the content of all Email Heading elements in Global Header section.","yaymail"),onChange:r})})]})]})}Qk(!1);const dM={globalHeaderElements:window.yaymailData.builder.global_headers_footers.global_header_elements,globalFooterElements:window.yaymailData.builder.global_headers_footers.global_footer_elements},hM=lE()(nE(eE(iE(((e,t)=>({templates:[],shortcodes:[],elements:[],currentTemplate:null,templateData:null,isPageLoading:!1,isReviewed:window.yaymailData.reviewed,globalHeaderFooter:dM,isTourMode:"second_move"!=window.yaymailData.ghf_tour,setTourMode:t=>{e((e=>{e.isTourMode=t}))},setTemplates:t=>{e((e=>{e.templates=t}))},setElements:t=>{e((e=>{e.elements=t}))},setShortcodes:t=>{e((e=>{e.shortcodes=t}))},updateTemplates:t=>{e((e=>{e.templates=t}))},updateTemplateData:t=>{e((e=>{e.templateData=t}))},updateCurrentTemplate:t=>e((e=>{e.currentTemplate=t})),setIsPageLoading:t=>{e((e=>{e.isPageLoading=t}))},setIsReviewed:t=>{e((e=>{e.isReviewed=t}))},updateTemplateSettings:(t,n)=>e((e=>{e.templateData&&(e.templateData[t]=n)})),updateTemplateSettingsObject:t=>e((e=>{t(e)})),updateItemTemplates:(t,n)=>{e((e=>{e.templates&&t(e.templates.find((e=>e.name===n)))}))},setGlobalHeaderFooter:t=>{e((e=>{e.globalHeaderFooter=t}))},hideTemplateGlobalHeader:t=>{e((e=>{var n;e.templateData&&((null==(n=e.templateData)?void 0:n.global_header_settings)?e.templateData.global_header_settings.hidden=t:e.templateData.global_header_settings={...cM,hidden:t})}))},hideTemplateGlobalFooter:t=>{e((e=>{var n;e.templateData&&((null==(n=e.templateData)?void 0:n.global_footer_settings)?e.templateData.global_footer_settings.hidden=t:e.templateData.global_footer_settings={...aM,hidden:t})}))}}))))),oE),pM=P$((([e,t])=>{const n=`.yaymail-customizer-email-template-container.yaymail-template-${e} a:not([role="button"])`;t&&window.jQuery(n).css("color",t)}),200);hM.subscribe((e=>{var t;return[e.currentTemplate,null==(t=e.templateData)?void 0:t.text_link_color]}),pM);const mM=window.React.useEffect;function fM(e,t){return function(){return e.apply(t,arguments)}}const{toString:gM}=Object.prototype,{getPrototypeOf:yM}=Object,vM=(bM=Object.create(null),e=>{const t=gM.call(e);return bM[t]||(bM[t]=t.slice(8,-1).toLowerCase())});var bM;const wM=e=>(e=e.toLowerCase(),t=>vM(t)===e),xM=e=>t=>typeof t===e,{isArray:CM}=Array,_M=xM("undefined"),SM=wM("ArrayBuffer"),kM=xM("string"),EM=xM("function"),$M=xM("number"),MM=e=>null!==e&&"object"==typeof e,RM=e=>{if("object"!==vM(e))return!1;const t=yM(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},AM=wM("Date"),OM=wM("File"),jM=wM("Blob"),TM=wM("FileList"),NM=wM("URLSearchParams");function LM(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let i,o;if("object"!=typeof e&&(e=[e]),CM(e))for(i=0,o=e.length;i0;)if(i=n[o],t===i.toLowerCase())return i;return null}const DM="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,HM=e=>!_M(e)&&e!==DM,PM=(zM="undefined"!=typeof Uint8Array&&yM(Uint8Array),e=>zM&&e instanceof zM);var zM;const FM=wM("HTMLFormElement"),VM=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),BM=wM("RegExp"),WM=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};LM(n,((n,o)=>{!1!==t(n,o,e)&&(i[o]=n)})),Object.defineProperties(e,i)},UM="abcdefghijklmnopqrstuvwxyz",YM="0123456789",ZM={DIGIT:YM,ALPHA:UM,ALPHA_DIGIT:UM+UM.toUpperCase()+YM},GM=wM("AsyncFunction"),qM={isArray:CM,isArrayBuffer:SM,isBuffer:function(e){return null!==e&&!_M(e)&&null!==e.constructor&&!_M(e.constructor)&&EM(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||EM(e.append)&&("formdata"===(t=vM(e))||"object"===t&&EM(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&SM(e.buffer),t},isString:kM,isNumber:$M,isBoolean:e=>!0===e||!1===e,isObject:MM,isPlainObject:RM,isUndefined:_M,isDate:AM,isFile:OM,isBlob:jM,isRegExp:BM,isFunction:EM,isStream:e=>MM(e)&&EM(e.pipe),isURLSearchParams:NM,isTypedArray:PM,isFileList:TM,forEach:LM,merge:function e(){const{caseless:t}=HM(this)&&this||{},n={},i=(i,o)=>{const r=t&&IM(n,o)||o;RM(n[r])&&RM(i)?n[r]=e(n[r],i):RM(i)?n[r]=e({},i):CM(i)?n[r]=i.slice():n[r]=i};for(let o=0,r=arguments.length;o(LM(t,((t,i)=>{n&&EM(t)?e[i]=fM(t,n):e[i]=t}),{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,i)=>{let o,r,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),r=o.length;r-- >0;)a=o[r],i&&!i(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&yM(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:vM,kindOfTest:wM,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return-1!==i&&i===n},toArray:e=>{if(!e)return null;if(CM(e))return e;let t=e.length;if(!$M(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=n.next())&&!i.done;){const n=i.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const i=[];for(;null!==(n=e.exec(t));)i.push(n);return i},isHTMLForm:FM,hasOwnProperty:VM,hasOwnProp:VM,reduceDescriptors:WM,freezeMethods:e=>{WM(e,((t,n)=>{if(EM(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=e[n];EM(i)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},i=e=>{e.forEach((e=>{n[e]=!0}))};return CM(e)?i(e):i(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:IM,global:DM,isContextDefined:HM,ALPHABET:ZM,generateString:(e=16,t=ZM.ALPHA_DIGIT)=>{let n="";const{length:i}=t;for(;e--;)n+=t[Math.random()*i|0];return n},isSpecCompliantForm:function(e){return!!(e&&EM(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,i)=>{if(MM(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[i]=e;const o=CM(e)?[]:{};return LM(e,((e,t)=>{const r=n(e,i+1);!_M(r)&&(o[t]=r)})),t[i]=void 0,o}}return e};return n(e,0)},isAsyncFn:GM,isThenable:e=>e&&(MM(e)||EM(e))&&EM(e.then)&&EM(e.catch)};function KM(e,t,n,i,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),o&&(this.response=o)}qM.inherits(KM,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:qM.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const QM=KM.prototype,XM={};function JM(e){return qM.isPlainObject(e)||qM.isArray(e)}function eR(e){return qM.endsWith(e,"[]")?e.slice(0,-2):e}function tR(e,t,n){return e?e.concat(t).map((function(e,t){return e=eR(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{XM[e]={value:e}})),Object.defineProperties(KM,XM),Object.defineProperty(QM,"isAxiosError",{value:!0}),KM.from=(e,t,n,i,o,r)=>{const a=Object.create(QM);return qM.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),KM.call(a,e.message,t,n,i,o),a.cause=e,a.name=e.name,r&&Object.assign(a,r),a};const nR=qM.toFlatObject(qM,{},null,(function(e){return/^is[A-Z]/.test(e)}));function iR(e,t,n){if(!qM.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const i=(n=qM.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!qM.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,r=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&qM.isSpecCompliantForm(t);if(!qM.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(qM.isDate(e))return e.toISOString();if(!s&&qM.isBlob(e))throw new KM("Blob is not supported. Use a Buffer instead.");return qM.isArrayBuffer(e)||qM.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let s=e;if(e&&!o&&"object"==typeof e)if(qM.endsWith(n,"{}"))n=i?n:n.slice(0,-2),e=JSON.stringify(e);else if(qM.isArray(e)&&function(e){return qM.isArray(e)&&!e.some(JM)}(e)||(qM.isFileList(e)||qM.endsWith(n,"[]"))&&(s=qM.toArray(e)))return n=eR(n),s.forEach((function(e,i){!qM.isUndefined(e)&&null!==e&&t.append(!0===a?tR([n],i,r):null===a?n:n+"[]",l(e))})),!1;return!!JM(e)||(t.append(tR(o,n,r),l(e)),!1)}const u=[],d=Object.assign(nR,{defaultVisitor:c,convertValue:l,isVisitable:JM});if(!qM.isObject(e))throw new TypeError("data must be an object");return function e(n,i){if(!qM.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+i.join("."));u.push(n),qM.forEach(n,(function(n,r){!0===(!(qM.isUndefined(n)||null===n)&&o.call(t,n,qM.isString(r)?r.trim():r,i,d))&&e(n,i?i.concat(r):[r])})),u.pop()}}(e),t}function oR(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function rR(e,t){this._pairs=[],e&&iR(e,this,t)}const aR=rR.prototype;function sR(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function lR(e,t,n){if(!t)return e;const i=n&&n.encode||sR,o=n&&n.serialize;let r;if(r=o?o(t,n):qM.isURLSearchParams(t)?t.toString():new rR(t,n).toString(i),r){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}aR.append=function(e,t){this._pairs.push([e,t])},aR.toString=function(e){const t=e?function(t){return e.call(this,t,oR)}:oR;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const cR=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){qM.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},uR={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},dR={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:rR,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function hR(e){function t(e,n,i,o){let r=e[o++];const a=Number.isFinite(+r),s=o>=e.length;return r=!r&&qM.isArray(i)?i.length:r,s?(qM.hasOwnProp(i,r)?i[r]=[i[r],n]:i[r]=n,!a):(i[r]&&qM.isObject(i[r])||(i[r]=[]),t(e,n,i[r],o)&&qM.isArray(i[r])&&(i[r]=function(e){const t={},n=Object.keys(e);let i;const o=n.length;let r;for(i=0;i{t(function(e){return qM.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),i,n,0)})),n}return null}const pR={"Content-Type":void 0},mR={transitional:uR,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,o=qM.isObject(e);if(o&&qM.isHTMLForm(e)&&(e=new FormData(e)),qM.isFormData(e))return i&&i?JSON.stringify(hR(e)):e;if(qM.isArrayBuffer(e)||qM.isBuffer(e)||qM.isStream(e)||qM.isFile(e)||qM.isBlob(e))return e;if(qM.isArrayBufferView(e))return e.buffer;if(qM.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let r;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return iR(e,new dR.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,i){return dR.isNode&&qM.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((r=qM.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return iR(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),function(e){if(qM.isString(e))try{return(0,JSON.parse)(e),qM.trim(e)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||mR.transitional,n=t&&t.forcedJSONParsing,i="json"===this.responseType;if(e&&qM.isString(e)&&(n&&!this.responseType||i)){const n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(o){if(n){if("SyntaxError"===o.name)throw KM.from(o,KM.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:dR.classes.FormData,Blob:dR.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};qM.forEach(["delete","get","head"],(function(e){mR.headers[e]={}})),qM.forEach(["post","put","patch"],(function(e){mR.headers[e]=qM.merge(pR)}));const fR=mR,gR=qM.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),yR=Symbol("internals");function vR(e){return e&&String(e).trim().toLowerCase()}function bR(e){return!1===e||null==e?e:qM.isArray(e)?e.map(bR):String(e)}function wR(e,t,n,i,o){return qM.isFunction(i)?i.call(this,t,n):(o&&(t=n),qM.isString(t)?qM.isString(i)?-1!==t.indexOf(i):qM.isRegExp(i)?i.test(t):void 0:void 0)}class xR{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function o(e,t,n){const o=vR(t);if(!o)throw new Error("header name must be a non-empty string");const r=qM.findKey(i,o);(!r||void 0===i[r]||!0===n||void 0===n&&!1!==i[r])&&(i[r||t]=bR(e))}const r=(e,t)=>qM.forEach(e,((e,n)=>o(e,n,t)));return qM.isPlainObject(e)||e instanceof this.constructor?r(e,t):qM.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?r((e=>{const t={};let n,i,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),i=e.substring(o+1).trim(),!n||t[n]&&gR[n]||("set-cookie"===n?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=vR(e)){const n=qM.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}(e);if(qM.isFunction(t))return t.call(this,e,n);if(qM.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=vR(e)){const n=qM.findKey(this,e);return!(!n||void 0===this[n]||t&&!wR(0,this[n],n,t))}return!1}delete(e,t){const n=this;let i=!1;function o(e){if(e=vR(e)){const o=qM.findKey(n,e);!o||t&&!wR(0,n[o],o,t)||(delete n[o],i=!0)}}return qM.isArray(e)?e.forEach(o):o(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const o=t[n];e&&!wR(0,this[o],o,e,!0)||(delete this[o],i=!0)}return i}normalize(e){const t=this,n={};return qM.forEach(this,((i,o)=>{const r=qM.findKey(n,o);if(r)return t[r]=bR(i),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete t[o],t[a]=bR(i),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return qM.forEach(this,((n,i)=>{null!=n&&!1!==n&&(t[i]=e&&qM.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[yR]=this[yR]={accessors:{}}).accessors,n=this.prototype;function i(e){const i=vR(e);t[i]||(function(e,t){const n=qM.toCamelCase(" "+t);["get","set","has"].forEach((i=>{Object.defineProperty(e,i+n,{value:function(e,n,o){return this[i].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[i]=!0)}return qM.isArray(e)?e.forEach(i):i(e),this}}xR.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),qM.freezeMethods(xR.prototype),qM.freezeMethods(xR);const CR=xR;function _R(e,t){const n=this||fR,i=t||n,o=CR.from(i.headers);let r=i.data;return qM.forEach(e,(function(e){r=e.call(n,r,o.normalize(),t?t.status:void 0)})),o.normalize(),r}function SR(e){return!(!e||!e.__CANCEL__)}function kR(e,t,n){KM.call(this,null==e?"canceled":e,KM.ERR_CANCELED,t,n),this.name="CanceledError"}qM.inherits(kR,KM,{__CANCEL__:!0});const ER=dR.isStandardBrowserEnv?{write:function(e,t,n,i,o,r){const a=[];a.push(e+"="+encodeURIComponent(t)),qM.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),qM.isString(i)&&a.push("path="+i),qM.isString(o)&&a.push("domain="+o),!0===r&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function $R(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const MR=dR.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function i(n){let i=n;return e&&(t.setAttribute("href",i),i=t.href),t.setAttribute("href",i),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=i(window.location.href),function(e){const t=qM.isString(e)?i(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function RR(e,t){let n=0;const i=function(e,t){e=e||10;const n=new Array(e),i=new Array(e);let o,r=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=i[a];o||(o=l),n[r]=s,i[r]=l;let u=a,d=0;for(;u!==r;)d+=n[u++],u%=e;if(r=(r+1)%e,r===a&&(a=(a+1)%e),l-o{const r=o.loaded,a=o.lengthComputable?o.total:void 0,s=r-n,l=i(s);n=r;const c={loaded:r,total:a,progress:a?r/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&r<=a?(a-r)/l:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const AR={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let i=e.data;const o=CR.from(e.headers).normalize(),r=e.responseType;let a;function s(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}qM.isFormData(i)&&(dR.isStandardBrowserEnv||dR.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const c=$R(e.baseURL,e.url);function u(){if(!l)return;const i=CR.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new KM("Request failed with status code "+n.status,[KM.ERR_BAD_REQUEST,KM.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),s()}),(function(e){n(e),s()}),{data:r&&"text"!==r&&"json"!==r?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:i,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),lR(c,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=u:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(u)},l.onabort=function(){l&&(n(new KM("Request aborted",KM.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new KM("Network Error",KM.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const i=e.transitional||uR;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new KM(t,i.clarifyTimeoutError?KM.ETIMEDOUT:KM.ECONNABORTED,e,l)),l=null},dR.isStandardBrowserEnv){const t=(e.withCredentials||MR(c))&&e.xsrfCookieName&&ER.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===i&&o.setContentType(null),"setRequestHeader"in l&&qM.forEach(o.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),qM.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),r&&"json"!==r&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",RR(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",RR(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=t=>{l&&(n(!t||t.type?new kR(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const d=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(c);d&&-1===dR.protocols.indexOf(d)?n(new KM("Unsupported protocol "+d+":",KM.ERR_BAD_REQUEST,e)):l.send(i||null)}))}};qM.forEach(AR,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}}));function OR(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new kR(null,e)}function jR(e){return OR(e),e.headers=CR.from(e.headers),e.data=_R.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),(e=>{e=qM.isArray(e)?e:[e];const{length:t}=e;let n,i;for(let o=0;oe instanceof CR?e.toJSON():e;function NR(e,t){t=t||{};const n={};function i(e,t,n){return qM.isPlainObject(e)&&qM.isPlainObject(t)?qM.merge.call({caseless:n},e,t):qM.isPlainObject(t)?qM.merge({},t):qM.isArray(t)?t.slice():t}function o(e,t,n){return qM.isUndefined(t)?qM.isUndefined(e)?void 0:i(void 0,e,n):i(e,t,n)}function r(e,t){if(!qM.isUndefined(t))return i(void 0,t)}function a(e,t){return qM.isUndefined(t)?qM.isUndefined(e)?void 0:i(void 0,e):i(void 0,t)}function s(n,o,r){return r in t?i(n,o):r in e?i(void 0,n):void 0}const l={url:r,method:r,data:r,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>o(TR(e),TR(t),!0)};return qM.forEach(Object.keys(Object.assign({},e,t)),(function(i){const r=l[i]||o,a=r(e[i],t[i],i);qM.isUndefined(a)&&r!==s||(n[i]=a)})),n}const LR={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{LR[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const IR={};LR.transitional=function(e,t,n){function i(e,t){return"[Axios v1.4.0] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,r)=>{if(!1===e)throw new KM(i(o," has been removed"+(t?" in "+t:"")),KM.ERR_DEPRECATED);return t&&!IR[o]&&(IR[o]=!0,console.warn(i(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,r)}};const DR={assertOptions:function(e,t,n){if("object"!=typeof e)throw new KM("options must be an object",KM.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let o=i.length;for(;o-- >0;){const r=i[o],a=t[r];if(a){const t=e[r],n=void 0===t||a(t,r,e);if(!0!==n)throw new KM("option "+r+" must be "+n,KM.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new KM("Unknown option "+r,KM.ERR_BAD_OPTION)}},validators:LR},HR=DR.validators;class PR{constructor(e){this.defaults=e,this.interceptors={request:new cR,response:new cR}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=NR(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:o}=t;let r;void 0!==n&&DR.assertOptions(n,{silentJSONParsing:HR.transitional(HR.boolean),forcedJSONParsing:HR.transitional(HR.boolean),clarifyTimeoutError:HR.transitional(HR.boolean)},!1),null!=i&&(qM.isFunction(i)?t.paramsSerializer={serialize:i}:DR.assertOptions(i,{encode:HR.function,serialize:HR.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase(),r=o&&qM.merge(o.common,o[t.method]),r&&qM.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=CR.concat(r,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,d=0;if(!s){const e=[jR.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);d{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const i=new Promise((e=>{n.subscribe(e),t=e})).then(e);return i.cancel=function(){n.unsubscribe(t)},i},e((function(e,i,o){n.reason||(n.reason=new kR(e,i,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new FR((function(t){e=t})),cancel:e}}}const VR=FR,BR={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(BR).forEach((([e,t])=>{BR[t]=e}));const WR=BR,UR=function e(t){const n=new zR(t),i=fM(zR.prototype.request,n);return qM.extend(i,zR.prototype,n,{allOwnKeys:!0}),qM.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return e(NR(t,n))},i}(fR);UR.Axios=zR,UR.CanceledError=kR,UR.CancelToken=VR,UR.isCancel=SR,UR.VERSION="1.4.0",UR.toFormData=iR,UR.AxiosError=KM,UR.Cancel=UR.CanceledError,UR.all=function(e){return Promise.all(e)},UR.spread=function(e){return function(t){return e.apply(null,t)}},UR.isAxiosError=function(e){return qM.isObject(e)&&!0===e.isAxiosError},UR.mergeConfig=NR,UR.AxiosHeaders=CR,UR.formToJSON=e=>hR(qM.isHTMLForm(e)?new FormData(e):e),UR.HttpStatusCode=WR,UR.default=UR;const YR=UR,ZR=window.yaymailData.rest_path,GR=YR.create({baseURL:`${ZR.root}${ZR.base}`,headers:{"Content-Type":"application/json","X-WP-Nonce":ZR.nonce},withCredentials:!0}),qR=(e,t)=>GR.get(e,t),KR=(e,t,n)=>GR.post(e,t,n);async function QR(e){const t=e.template_id;return await KR(`/templates/${t}`,{...e})}async function XR(e){return(await KR("/templates/change-status",{list_id:e.list_id,status:e.status})).data}async function JR(e){return(await KR("/templates/reset",{list_id:e})).data}async function eA(e){return(await KR("/templates/copy-template",{template_id:e.template_id,from_template:e.from_template})).data}const tA=window.React.useEffect;async function nA(e){return(await KR("/settings",{settings:e})).data}function iA(e){const t=QS();return{...sk({queryKey:["settings"],queryFn:async()=>{if(window.yaymailData.isInitialTemplateDataLoading)return null;const e=await async function(){return await qR("/settings")}();if(e.data&&e.data.isError)throw new Error(e.data.message??"Unknown error");return e.data},retry:!1,refetchOnWindowFocus:!1,enabled:(null==e?void 0:e.fetch)??!0,keepPreviousData:!0}),saveSettingsMutation:ok({mutationFn:nA,onMutate:()=>{hM.setState((e=>{e.isPageLoading=!0}))},onSettled:()=>{hM.setState((e=>{e.isPageLoading=!1}))},onSuccess:(e,n)=>{cE.setState((e=>{e.hasChanged=!1})),t.setQueryData(["settings"],(e=>null==e?e:{...e,...n}))}})}}const oA=window.React.useEffect;function rA(e){const t=QS(),{template_name:n="new_order"}=e??{};window.yaymailData.isInitialTemplateDataLoading=window.yaymailData.isInitialTemplateDataLoading??!0;const i=sk({queryKey:["template",n,window.yaymailData.isInitialTemplateDataLoading],queryFn:async()=>{if(window.yaymailData.isInitialTemplateDataLoading)return null;const e=await async function(e){return await qR("/templates/get-template-by-name",{params:{template_name:e}})}(n??"new_order");if(e.data&&e.data.isError)throw new Error(e.data.message??"Unknown error");return e.data},retry:!1,refetchOnWindowFocus:!1,keepPreviousData:!0,enabled:(null==e?void 0:e.fetch)??!0});return{...i,updateTemplateMutation:ok({mutationFn:QR,onMutate:()=>{hM.setState((e=>{e.isPageLoading=!0}))},onSuccess:e=>{t.setQueriesData(["template",n],(()=>e.data))},onSettled:()=>{hM.setState((e=>{e.isPageLoading=!1}))}}),resetTemplateMutation:ok({mutationFn:JR,onSuccess:e=>{if(null==e.list_template_data||e.list_template_data.length<1)return;const i=e.list_template_data[0];t.setQueriesData(["template",n],(()=>i)),eM.getState().updateList(i.elements),hM.getState().updateTemplateSettings("background_color",i.background_color),hM.getState().updateTemplateSettings("content_background_color",i.content_background_color),hM.getState().updateTemplateSettings("content_text_color",i.content_text_color),hM.getState().updateTemplateSettings("title_color",i.title_color),hM.getState().updateTemplateSettings("text_link_color",i.text_link_color),hM.getState().hideTemplateGlobalFooter(!0),hM.getState().hideTemplateGlobalHeader(!0)},onMutate:()=>{hM.setState((e=>{e.isPageLoading=!0}))},onSettled:()=>{hM.setState((e=>{e.isPageLoading=!1}))}}),changeStatusMutation:ok({mutationFn:XR,onSuccess:(e,n)=>{t.setQueryData(["templates"],(e=>null==e?void 0:e.map((e=>n.list_id.includes(e.id.toString())?{...e,status:n.status}:e))))},onMutate:()=>{hM.setState((e=>{e.isPageLoading=!0}))},onSettled:()=>{hM.setState((e=>{e.isPageLoading=!1}))}}),copyTemplateMutation:ok({mutationFn:eA,onSuccess:e=>{e.success&&(t.invalidateQueries({queryKey:["template",n]}),t.invalidateQueries({queryKey:["revision",n]}))},onMutate:()=>{hM.setState((e=>{e.isPageLoading=!0}))},onSettled:()=>{hM.setState((e=>{e.isPageLoading=!1}))}})}}const aA=window.React.useEffect;function sA(e){const t=QS(),n=!e&&window.yaymailData.isInitialTemplateDataLoading,i=hM((e=>e.setTemplates)),o=sk({queryKey:["templates"],queryFn:async()=>{if(n)return;const e=await async function(){return await qR("/templates")}();if(e.data&&e.data.isError)throw new Error(e.data.message??"Unknown error");return t.invalidateQueries({queryKey:["template"]}),e.data},retry:!1,refetchOnWindowFocus:!1,keepPreviousData:!0}),r=ok({mutationFn:XR,onSuccess:(e,n)=>{t.setQueryData(["templates"],(e=>null==e?e:e.map((e=>n.list_id.includes(e.id)?{...e,status:n.status}:e)))),t.invalidateQueries({queryKey:["template"]})}}),a=ok({mutationFn:JR,onSuccess:()=>t.invalidateQueries({predicate:e=>"template"===e.queryKey[0]})});return aA((()=>{i(o.data??[])}),[o.data]),{...o,changeStatusesMutation:r,resetTemplatesMutation:a}}const lA=window.React.createContext,cA=window.React.memo,uA=window.React.useMemo,dA=window.React.useState,hA=lA({}),pA=window.yaymailData.list_orders,mA=cA((function(e){const[t,n]=dA(pA[0].id),i=uA((()=>({selectedOrderID:t,setSelectedOrderID:n,listOrders:pA})),[t,n]);return Mn.jsx(hA.Provider,{value:i,children:e.children})})),fA=window.React.createContext,gA=window.React.useContext,yA=window.React.useEffect,vA=window.React.useMemo,bA=fA({isPageFetching:!1}),wA=e=>{const{children:t,templateId:n,...i}=e,{selectedOrderID:o}=gA(hA),r=h_(),a=new URLSearchParams(r.search),s=hM((e=>e.updateCurrentTemplate)),l=hM((e=>e.updateTemplateData)),c=eM((e=>e.updateList)),u=eM((e=>e.changeContentStatus)),d=X$((e=>e.pushNewChange)),h=vA((()=>a.get("template")),[a]),p=hM((e=>h??e.currentTemplate??n));yA((()=>{s(n??h)}),[n,h]),function(e){const{template_name:t="new_order",order_id:n="sample_order"}=e??{},i=QS(),o=hM((e=>e.setTemplates)),r=hM((e=>e.setElements)),a=hM((e=>e.setShortcodes)),s=cE((e=>e.updateSettings));mM((()=>{(async()=>{var l,c;try{hM.setState((e=>{e.isPageLoading=!0})),window.yaymailData.isInitialTemplateDataLoading=!0;const u=await(c={...e??{}},4!==(null==mE?void 0:mE.readyState)&&(null==mE||mE.abort()),mE=window.jQuery.ajax({type:"POST",url:window.yaymailData.admin_ajax.url,data:{action:"yaymail_get_template_data_onload",nonce:window.yaymailData.admin_ajax.nonce,data:c}}),mE),d=null==u?void 0:u.data;i.setQueryData(["settings"],null==d?void 0:d.settings_data),s(null==d?void 0:d.settings_data),i.setQueryData(["templates"],null==d?void 0:d.templates_data),o(null==d?void 0:d.templates_data),i.setQueryData(["template",t??"new_order",!1],null==d?void 0:d.selected_template_data);const h=bE(Object.values(null==d?void 0:d.elements_data));i.setQueryData(["elements",t],h),r(h),i.setQueryData(["shortcodes",t,n],null==d?void 0:d.shortcodes_data),a((null==(l=null==u?void 0:u.data)?void 0:l.shortcodes_data)??[])}catch(u){console.debug("YayMail: ","Error trying to load template data\n",u)}finally{window.yaymailData.isInitialTemplateDataLoading=!1,hM.setState((e=>{e.isPageLoading=!1}))}})()}),[])}({template_name:p,order_id:o});const{isFetching:m}=function(e){const t=hM((e=>e.setElements)),{template_name:n="new_order"}=e??{},i=sk({queryKey:["elements",n],queryFn:async()=>{if(window.yaymailData.isInitialTemplateDataLoading)return[];const e=await async function(e){return await qR(`/templates/${e}/all-elements`)}(n);if(e.data&&e.data.isError)throw new Error(e.data.message??"Unknown error");return bE(Object.values(e.data))},retry:!1,refetchOnWindowFocus:!1,keepPreviousData:!0});return tA((()=>{t(i.data??[])}),[i.data]),{...i}}({template_name:p}),{isFetching:f}=function(e){const t=hM((e=>e.setShortcodes)),{template_name:n="new_order",order_id:i="sample_order"}=e??{},o=sk({queryKey:["shortcodes",n,i],queryFn:async()=>{if(window.yaymailData.isInitialTemplateDataLoading)return[];const e=await async function(e,t){const n=t||"sample_order";return await qR(`/templates/${e}/all-shortcodes/${n}`)}(n,i);if(e.data&&e.data.isError)throw new Error(e.data.message??"Unknown error");return e.data},retry:!1,refetchOnWindowFocus:!1,keepPreviousData:!0});return oA((()=>{t(o.data??[])}),[o.data]),{...o}}({template_name:p,order_id:o}),{data:g,isFetching:y}=rA({template_name:p}),{isFetching:v}=iA(),{isFetching:b}=sA();yA((()=>{l(g),c((null==g?void 0:g.elements)??[]),u(!1),d((null==g?void 0:g.elements)??[],{action:"initialized"})}),[g]);const w=vA((()=>({isPageFetching:window.yaymailData.isInitialTemplateDataLoading||m||f||v||b||y,hasTemplateSelector:!0,hasOrderSelector:!0,hasTemplateImporter:!0,hasActivationButton:!0,hasSendTestMailButton:!0,...i})),[p,window.yaymailData.isInitialTemplateDataLoading,m,f,y,v,b,i]);return Mn.jsx(bA.Provider,{value:w,children:t})},xA=window.React.useMemo;function CA(){const e=hM((e=>e.templateData));return{isTemplateExist:xA((()=>e&&null!=(null==e?void 0:e.id)),[e])}}const _A=()=>{const e=eM((e=>e.hasChanged)),t=__("You have unsaved changes. Are you sure you want to leave?","yaymail");(function(e){let{when:t,message:n}=e,i=function(e){let{router:t,basename:n}=E_(x_.UseBlocker),i=$_(S_.UseBlocker),[o,r]=i_.useState(""),[a,s]=i_.useState(kC),l=i_.useCallback((t=>{if("function"!=typeof e)return!!e;if("/"===n)return e(t);let{currentLocation:i,nextLocation:o,historyAction:r}=t;return e({currentLocation:o_({},i,{pathname:sC(i.pathname,n)||i.pathname}),nextLocation:o_({},o,{pathname:sC(o.pathname,n)||o.pathname}),historyAction:r})}),[n,e]);return i_.useEffect((()=>{let e=String(++R_);return s(t.getBlocker(e,l)),r(e),()=>t.deleteBlocker(e)}),[t,s,r,l]),o&&i.blockers.has(o)?i.blockers.get(o):a}(t);P_.useEffect((()=>{"blocked"!==i.state||t||i.reset()}),[i,t]),P_.useEffect((()=>{"blocked"===i.state&&(window.confirm(n)?setTimeout(i.proceed,0):i.reset())}),[i,n])})({message:t,when:e}),function(e){let{capture:t}={};P_.useEffect((()=>{let n=null!=t?{capture:t}:void 0;return window.addEventListener("beforeunload",e,n),()=>{window.removeEventListener("beforeunload",e,n)}}),[e,t])}((n=>{if(e)return n.returnValue=t,t}))},SA=window.jQuery,kA=(e,t)=>{const n=e.filter((e=>e.type===(null==t?void 0:t.type)));return!!(n&&n.length>0)&&n[0].available},EA=e=>{SA(".yaymail-customizer-email-template-container table").each(((t,n)=>{const i=SA(n);i.css("text-align")||i.css("text-align",e)}))};var $A={exports:{}},MA={},RA=Symbol.for("react.element"),AA=Symbol.for("react.portal"),OA=Symbol.for("react.fragment"),jA=Symbol.for("react.strict_mode"),TA=Symbol.for("react.profiler"),NA=Symbol.for("react.provider"),LA=Symbol.for("react.context"),IA=Symbol.for("react.forward_ref"),DA=Symbol.for("react.suspense"),HA=Symbol.for("react.memo"),PA=Symbol.for("react.lazy"),zA=Symbol.iterator,FA={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},VA=Object.assign,BA={};function WA(e,t,n){this.props=e,this.context=t,this.refs=BA,this.updater=n||FA}function UA(){}function YA(e,t,n){this.props=e,this.context=t,this.refs=BA,this.updater=n||FA}WA.prototype.isReactComponent={},WA.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},WA.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},UA.prototype=WA.prototype;var ZA=YA.prototype=new UA;ZA.constructor=YA,VA(ZA,WA.prototype),ZA.isPureReactComponent=!0;var GA=Array.isArray,qA=Object.prototype.hasOwnProperty,KA={current:null},QA={key:!0,ref:!0,__self:!0,__source:!0};function XA(e,t,n){var i,o={},r=null,a=null;if(null!=t)for(i in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(r=""+t.key),t)qA.call(t,i)&&!QA.hasOwnProperty(i)&&(o[i]=t[i]);var s=arguments.length-2;if(1===s)o.children=n;else if(1lO.createElement("svg",{viewBox:"64 64 896 896","data-icon":"exclamation-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false",...e},lO.createElement("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 0 1 0-96 48.01 48.01 0 0 1 0 96z"})),uO=()=>{var e;const t=hM((e=>e.templateData)),n=(null==(e=null==t?void 0:t.addon_info)?void 0:e.link_upgrade)??"";return Mn.jsxs("div",{children:[Mn.jsx("i",{className:"yaymail-notice-icon",children:Mn.jsx(cO,{})}),Mn.jsxs("p",{children:[Mn.jsx("span",{children:__(" This email template can be fully customized with YayMail Premium Addon. ","yaymail")}),Mn.jsx("a",{style:{fontWeight:"bold",textDecoration:"underline"},className:"yaymail-link-upgrade",href:n,target:"_blank",onClick:e=>{e.stopPropagation()},rel:"noreferrer",children:__("Buy Now","yaymail")})]})]})},dO=window.React.useMemo,hO=()=>{const e=hM((e=>e.templateData)),t=dO((()=>{const t=(e=>{const t=(null==e?void 0:e.template_base)??"";if(0===t.length||!t.includes("/plugins/"))return"";const n=t.split("/plugins/");return Array.isArray(n)&&n.length>0?n[1].split("/")[0]:""})((t=>{for(const[n,i]of Object.entries(t))if((null==i?void 0:i.id)===(null==e?void 0:e.name))return i})(window.yaymailData.wc_emails)),n=window.yaymailData.supported_plugins;for(const[e,i]of Object.entries(n)){if(Array.isArray(i.slug_name))for(const e of i.slug_name)if(e===t)return{status:!0,plugin_name:i.plugin_name};if(i.slug_name===t)return{status:!0,plugin_name:i.plugin_name}}return{status:!1,plugin_name:""}}),[e]);return Mn.jsxs("div",{children:[Mn.jsx("i",{className:"yaymail-notice-icon",children:Mn.jsx(cO,{})}),Mn.jsxs("p",{children:[Mn.jsx("span",{children:__(" This template is unavailable at the moment. ","yaymail")}),Mn.jsx("a",{style:{fontWeight:"bold",textDecoration:"underline"},className:"yaymail-link-upgrade",href:"https://yaycommerce.com/support/",target:"_blank",onClick:e=>{e.stopPropagation()},rel:"noreferrer",children:__("Contact us","yaymail")}),Mn.jsx("span",{children:__(" to see if it can be customized with ","yaymail")}),Mn.jsx("a",{style:{fontWeight:"bold",textDecoration:"underline"},className:"yaymail-link-upgrade",href:"https://yaycommerce.com/yaymail-addons/",target:"_blank",onClick:e=>{e.stopPropagation()},rel:"noreferrer",children:__("YayMail Addon.","yaymail")}),t.status&&Mn.jsxs(Mn.Fragment,{children:[Mn.jsx("br",{}),Mn.jsx("span",{children:__("We already support several other emails for %s plugin.","yaymail").replace("%s",t?null==t?void 0:t.plugin_name:"this")}),Mn.jsx("span",{children:__("Please contact us to request features.","yaymail")})]})]})]})},pO=()=>Mn.jsxs("div",{children:[Mn.jsx("i",{className:"yaymail-notice-icon",children:Mn.jsx(cO,{})}),Mn.jsxs("p",{children:[Mn.jsxs("span",{children:[" ",__(" This email template can be fully customized with YayMail Pro. ","yaymail")]}),Mn.jsx("a",{style:{fontWeight:"bold",textDecoration:"underline"},className:"yaymail-link-upgrade",href:"https://yaycommerce.com/yaymail-woocommerce-email-customizer/",target:"_blank",onClick:e=>{e.stopPropagation()},rel:"noreferrer",children:__("Upgrade Now","yaymail")})]})]}),mO=window.React.useMemo;function fO(){const e=cE((e=>e.settings));return mO((()=>(null==e?void 0:e.direction)??"ltr"),[e])}const gO=window.React.useMemo,yO=()=>{const e=cE((e=>e.settings)),t=hM((e=>e.templateData)),n=fO(),i=gO((()=>e&&e.container_width&&!isNaN(e.container_width)?null==e?void 0:e.container_width:605),[e]),o=gO((()=>({width:UE(i),direction:"rtl"==n?"rtl":"initial"})),[i,n]);return Mn.jsx("div",{className:"yaymail-notice-message",style:o,children:(r=null==t?void 0:t.support_status,"addon_needed"===r?Mn.jsx(uO,{}):"pro_needed"===r?Mn.jsx(pO,{}):"not_supported"===r?Mn.jsx(hO,{}):null)});var r};var vO={exports:{}};function bO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function wO(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,i=new Array(t);n"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(n){return!1}return!1}}function IO(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function DO(e,t,n,i){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&LO(e,t):LO(e,t))||i&&e===n)return e;if(e===n)break}while(e=IO(e))}return null}var HO,PO=/\s+/g;function zO(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(PO," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(PO," ")}}function FO(e,t,n){var i=e&&e.style;if(i){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in i||-1!==t.indexOf("webkit")||(t="-webkit-"+t),i[t]=n+("string"==typeof n?"":"px")}}function VO(e,t){var n="";if("string"==typeof e)n=e;else do{var i=FO(e,"transform");i&&"none"!==i&&(n=i+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function BO(e,t,n){if(e){var i=e.getElementsByTagName(t),o=0,r=i.length;if(n)for(;o=r:o<=r))return i;if(i===WO())break;i=QO(i,!1)}return!1}function ZO(e,t,n,i){for(var o=0,r=0,a=e.children;r2&&void 0!==arguments[2]?arguments[2]:{},i=n.evt,o=function(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n,i,o={},r=Object.keys(e);for(i=0;i=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(n,cj);sj.pluginEvent.bind(nT)(e,t,wO({dragEl:hj,parentEl:pj,ghostEl:mj,rootEl:fj,nextEl:gj,lastDownEl:yj,cloneEl:vj,cloneHidden:bj,dragStarted:jj,putSortable:kj,activeSortable:nT.active,originalEvent:i,oldIndex:wj,oldDraggableIndex:Cj,newIndex:xj,newDraggableIndex:_j,hideGhostForTarget:Xj,unhideGhostForTarget:Jj,cloneNowHidden:function(){bj=!0},cloneNowShown:function(){bj=!1},dispatchSortableEvent:function(e){dj({sortable:t,name:e,originalEvent:i})}},o))};function dj(e){lj(wO({putSortable:kj,cloneEl:vj,targetEl:hj,rootEl:fj,oldIndex:wj,oldDraggableIndex:Cj,newIndex:xj,newDraggableIndex:_j},e))}var hj,pj,mj,fj,gj,yj,vj,bj,wj,xj,Cj,_j,Sj,kj,Ej,$j,Mj,Rj,Aj,Oj,jj,Tj,Nj,Lj,Ij,Dj=!1,Hj=!1,Pj=[],zj=!1,Fj=!1,Vj=[],Bj=!1,Wj=[],Uj="undefined"!=typeof document,Yj=AO,Zj=$O||EO?"cssFloat":"float",Gj=Uj&&!OO&&!AO&&"draggable"in document.createElement("div"),qj=function(){if(Uj){if(EO)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Kj=function(e,t){var n=FO(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=ZO(e,0,t),r=ZO(e,1,t),a=o&&FO(o),s=r&&FO(r),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+UO(o).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+UO(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!r||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=i&&"none"===n[Zj]||r&&"none"===n[Zj]&&l+c>i)?"vertical":"horizontal"},Qj=function(e){function t(e,n){return function(i,o,r,a){var s=i.options.group.name&&o.options.group.name&&i.options.group.name===o.options.group.name;if(null==e&&(n||s))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(i,o,r,a),n)(i,o,r,a);var l=(n?i:o).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var n={},i=e.group;i&&"object"==xO(i)||(i={name:i}),n.name=i.name,n.checkPull=t(i.pull,!0),n.checkPut=t(i.put),n.revertClone=i.revertClone,e.group=n},Xj=function(){!qj&&mj&&FO(mj,"display","none")},Jj=function(){!qj&&mj&&FO(mj,"display","")};Uj&&!OO&&document.addEventListener("click",(function(e){if(Hj)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Hj=!1,!1}),!0);var eT=function(e){if(hj){e=e.touches?e.touches[0]:e;var t=(o=e.clientX,r=e.clientY,Pj.some((function(e){var t=e[oj].options.emptyInsertThreshold;if(t&&!GO(e)){var n=UO(e),i=o>=n.left-t&&o<=n.right+t,s=r>=n.top-t&&r<=n.bottom+t;return i&&s?a=e:void 0}})),a);if(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[oj]._onDragOver(n)}}var o,r,a},tT=function(e){hj&&hj.parentNode[oj]._isOutsideThisEl(e.target)};function nT(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=_O({},t),e[oj]=this;var n,i,o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Kj(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.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:!1!==nT.supportPointer&&"PointerEvent"in window&&!RO,emptyInsertThreshold:5};for(var r in sj.initializePlugins(this,e,o),o)!(r in t)&&(t[r]=o[r]);for(var a in Qj(t),this)"_"===a.charAt(0)&&"function"==typeof this[a]&&(this[a]=this[a].bind(this));this.nativeDraggable=!t.forceFallback&&Gj,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?TO(e,"pointerdown",this._onTapStart):(TO(e,"mousedown",this._onTapStart),TO(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(TO(e,"dragover",this),TO(e,"dragenter",this)),Pj.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),_O(this,(i=[],{captureAnimationState:function(){i=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){if("none"!==FO(e,"display")&&e!==nT.ghost){i.push({target:e,rect:UO(e)});var t=wO({},i[i.length-1].rect);if(e.thisAnimationDuration){var n=VO(e,!0);n&&(t.top-=n.f,t.left-=n.e)}e.fromRect=t}}))},addAnimationState:function(e){i.push(e)},removeAnimationState:function(e){i.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var i in t)if(t.hasOwnProperty(i)&&t[i]===e[n][i])return Number(n);return-1}(i,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof e&&e());var o=!1,r=0;i.forEach((function(e){var n=0,i=e.target,a=i.fromRect,s=UO(i),l=i.prevFromRect,c=i.prevToRect,u=e.rect,d=VO(i,!0);d&&(s.top-=d.f,s.left-=d.e),i.toRect=s,i.thisAnimationDuration&&XO(l,s)&&!XO(a,s)&&(u.top-s.top)/(u.left-s.left)===(a.top-s.top)/(a.left-s.left)&&(n=function(e,t,n,i){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*i.animation}(u,l,c,t.options)),XO(s,a)||(i.prevFromRect=a,i.prevToRect=s,n||(n=t.options.animation),t.animate(i,u,s,n)),n&&(o=!0,r=Math.max(r,n),clearTimeout(i.animationResetTimer),i.animationResetTimer=setTimeout((function(){i.animationTime=0,i.prevFromRect=null,i.fromRect=null,i.prevToRect=null,i.thisAnimationDuration=null}),n),i.thisAnimationDuration=n)})),clearTimeout(n),o?n=setTimeout((function(){"function"==typeof e&&e()}),r):"function"==typeof e&&e(),i=[]},animate:function(e,t,n,i){if(i){FO(e,"transition",""),FO(e,"transform","");var o=VO(this.el),r=o&&o.a,a=o&&o.d,s=(t.left-n.left)/(r||1),l=(t.top-n.top)/(a||1);e.animatingX=!!s,e.animatingY=!!l,FO(e,"transform","translate3d("+s+"px,"+l+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),FO(e,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),FO(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){FO(e,"transition",""),FO(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),i)}}}))}function iT(e,t,n,i,o,r,a,s){var l,c,u=e[oj],d=u.options.onMove;return!window.CustomEvent||EO||$O?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=n,l.draggedRect=i,l.related=o||t,l.relatedRect=r||UO(t),l.willInsertAfter=s,l.originalEvent=a,e.dispatchEvent(l),d&&(c=d.call(u,l,a)),c}function oT(e){e.draggable=!1}function rT(){Bj=!1}function aT(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}function sT(e){return setTimeout(e,0)}function lT(e){return clearTimeout(e)}nT.prototype={constructor:nT,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(Tj=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,hj):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,o=i.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,s=(a||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=i.filter;if(function(e){Wj.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var i=t[n];i.checked&&Wj.push(i)}}(n),!hj&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||i.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!RO||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=DO(s,i.draggable,n,!1))&&s.animated||yj===s)){if(wj=qO(s),Cj=qO(s,i.draggable),"function"==typeof c){if(c.call(this,e,s,this))return dj({sortable:t,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),uj("filter",t,{evt:e}),void(o&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(i){if(i=DO(l,i.trim(),n,!1))return dj({sortable:t,rootEl:i,name:"filter",targetEl:s,fromEl:n,toEl:n}),uj("filter",t,{evt:e}),!0}))))return void(o&&e.cancelable&&e.preventDefault());i.handle&&!DO(l,i.handle,n,!1)||this._prepareDragStart(e,a,s)}}},_prepareDragStart:function(e,t,n){var i,o=this,r=o.el,a=o.options,s=r.ownerDocument;if(n&&!hj&&n.parentNode===r){var l=UO(n);if(fj=r,pj=(hj=n).parentNode,gj=hj.nextSibling,yj=n,Sj=a.group,nT.dragged=hj,Ej={target:hj,clientX:(t||e).clientX,clientY:(t||e).clientY},Aj=Ej.clientX-l.left,Oj=Ej.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,hj.style["will-change"]="all",i=function(){uj("delayEnded",o,{evt:e}),nT.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!MO&&o.nativeDraggable&&(hj.draggable=!0),o._triggerDragStart(e,t),dj({sortable:o,name:"choose",originalEvent:e}),zO(hj,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){BO(hj,e.trim(),oT)})),TO(s,"dragover",eT),TO(s,"mousemove",eT),TO(s,"touchmove",eT),TO(s,"mouseup",o._onDrop),TO(s,"touchend",o._onDrop),TO(s,"touchcancel",o._onDrop),MO&&this.nativeDraggable&&(this.options.touchStartThreshold=4,hj.draggable=!0),uj("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&($O||EO))i();else{if(nT.eventCanceled)return void this._onDrop();TO(s,"mouseup",o._disableDelayedDrag),TO(s,"touchend",o._disableDelayedDrag),TO(s,"touchcancel",o._disableDelayedDrag),TO(s,"mousemove",o._delayedDragTouchMoveHandler),TO(s,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&TO(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(i,a.delay)}}},_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(){hj&&oT(hj),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;NO(e,"mouseup",this._disableDelayedDrag),NO(e,"touchend",this._disableDelayedDrag),NO(e,"touchcancel",this._disableDelayedDrag),NO(e,"mousemove",this._delayedDragTouchMoveHandler),NO(e,"touchmove",this._delayedDragTouchMoveHandler),NO(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?TO(document,"pointermove",this._onTouchMove):TO(document,t?"touchmove":"mousemove",this._onTouchMove):(TO(hj,"dragend",this),TO(fj,"dragstart",this._onDragStart));try{document.selection?sT((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(e,t){if(Dj=!1,fj&&hj){uj("dragStarted",this,{evt:t}),this.nativeDraggable&&TO(document,"dragover",tT);var n=this.options;!e&&zO(hj,n.dragClass,!1),zO(hj,n.ghostClass,!0),nT.active=this,e&&this._appendGhost(),dj({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if($j){this._lastX=$j.clientX,this._lastY=$j.clientY,Xj();for(var e=document.elementFromPoint($j.clientX,$j.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint($j.clientX,$j.clientY))!==t;)t=e;if(hj.parentNode[oj]._isOutsideThisEl(e),t)do{if(t[oj]&&t[oj]._onDragOver({clientX:$j.clientX,clientY:$j.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);Jj()}},_onTouchMove:function(e){if(Ej){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,o=e.touches?e.touches[0]:e,r=mj&&VO(mj,!0),a=mj&&r&&r.a,s=mj&&r&&r.d,l=Yj&&Ij&&KO(Ij),c=(o.clientX-Ej.clientX+i.x)/(a||1)+(l?l[0]-Vj[0]:0)/(a||1),u=(o.clientY-Ej.clientY+i.y)/(s||1)+(l?l[1]-Vj[1]:0)/(s||1);if(!nT.active&&!Dj){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))i.right+10||e.clientX<=i.right&&e.clientY>i.bottom&&e.clientX>=i.left:e.clientX>i.right&&e.clientY>i.top||e.clientX<=i.right&&e.clientY>i.bottom+10}(e,o,this)&&!f.animated){if(f===hj)return O(!1);if(f&&r===e.target&&(a=f),a&&(n=UO(a)),!1!==iT(fj,r,hj,t,a,n,e,!!a))return A(),f&&f.nextSibling?r.insertBefore(hj,f.nextSibling):r.appendChild(hj),pj=r,j(),O(!0)}else if(f&&function(e,t,n){var i=UO(ZO(n.el,0,n.options,!0));return t?e.clientXu+c*r/2:ld-Lj)return-Nj}else if(l>u+c*(1-o)/2&&ld-c*r/2)?l>u+c/2?1:-1:0}(e,a,n,o,x?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Fj,Tj===a),0!==y){var k=qO(hj);do{k-=y,b=pj.children[k]}while(b&&("none"===FO(b,"display")||b===mj))}if(0===y||b===a)return O(!1);Tj=a,Nj=y;var E=a.nextElementSibling,$=!1,M=iT(fj,r,hj,t,a,n,e,$=1===y);if(!1!==M)return 1!==M&&-1!==M||($=1===M),Bj=!0,setTimeout(rT,30),A(),$&&!E?r.appendChild(hj):a.parentNode.insertBefore(hj,$?E:a),_&&ej(_,0,S-_.scrollTop),pj=hj.parentNode,void 0===v||Fj||(Lj=Math.abs(v-UO(a)[C])),j(),O(!0)}if(r.contains(hj))return O(!1)}return!1}function R(s,l){uj(s,p,wO({evt:e,isOwner:u,axis:o?"vertical":"horizontal",revert:i,dragRect:t,targetRect:n,canSort:d,fromSortable:h,target:a,completed:O,onMove:function(n,i){return iT(fj,r,hj,t,n,UO(n),e,i)},changed:j},l))}function A(){R("dragOverAnimationCapture"),p.captureAnimationState(),p!==h&&h.captureAnimationState()}function O(t){return R("dragOverCompleted",{insertion:t}),t&&(u?c._hideClone():c._showClone(p),p!==h&&(zO(hj,kj?kj.options.ghostClass:c.options.ghostClass,!1),zO(hj,s.ghostClass,!0)),kj!==p&&p!==nT.active?kj=p:p===nT.active&&kj&&(kj=null),h===p&&(p._ignoreWhileAnimating=a),p.animateAll((function(){R("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(a===hj&&!hj.animated||a===r&&!a.animated)&&(Tj=null),s.dragoverBubble||e.rootEl||a===document||(hj.parentNode[oj]._isOutsideThisEl(e.target),!t&&eT(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function j(){xj=qO(hj),_j=qO(hj,s.draggable),dj({sortable:p,name:"change",toEl:r,newIndex:xj,newDraggableIndex:_j,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){NO(document,"mousemove",this._onTouchMove),NO(document,"touchmove",this._onTouchMove),NO(document,"pointermove",this._onTouchMove),NO(document,"dragover",eT),NO(document,"mousemove",eT),NO(document,"touchmove",eT)},_offUpEvents:function(){var e=this.el.ownerDocument;NO(e,"mouseup",this._onDrop),NO(e,"touchend",this._onDrop),NO(e,"pointerup",this._onDrop),NO(e,"touchcancel",this._onDrop),NO(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;xj=qO(hj),_j=qO(hj,n.draggable),uj("drop",this,{evt:e}),pj=hj&&hj.parentNode,xj=qO(hj),_j=qO(hj,n.draggable),nT.eventCanceled||(Dj=!1,Fj=!1,zj=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),lT(this.cloneId),lT(this._dragStartId),this.nativeDraggable&&(NO(document,"drop",this),NO(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),RO&&FO(document.body,"user-select",""),FO(hj,"transform",""),e&&(jj&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),mj&&mj.parentNode&&mj.parentNode.removeChild(mj),(fj===pj||kj&&"clone"!==kj.lastPutMode)&&vj&&vj.parentNode&&vj.parentNode.removeChild(vj),hj&&(this.nativeDraggable&&NO(hj,"dragend",this),oT(hj),hj.style["will-change"]="",jj&&!Dj&&zO(hj,kj?kj.options.ghostClass:this.options.ghostClass,!1),zO(hj,this.options.chosenClass,!1),dj({sortable:this,name:"unchoose",toEl:pj,newIndex:null,newDraggableIndex:null,originalEvent:e}),fj!==pj?(xj>=0&&(dj({rootEl:pj,name:"add",toEl:pj,fromEl:fj,originalEvent:e}),dj({sortable:this,name:"remove",toEl:pj,originalEvent:e}),dj({rootEl:pj,name:"sort",toEl:pj,fromEl:fj,originalEvent:e}),dj({sortable:this,name:"sort",toEl:pj,originalEvent:e})),kj&&kj.save()):xj!==wj&&xj>=0&&(dj({sortable:this,name:"update",toEl:pj,originalEvent:e}),dj({sortable:this,name:"sort",toEl:pj,originalEvent:e})),nT.active&&(null!=xj&&-1!==xj||(xj=wj,_j=Cj),dj({sortable:this,name:"end",toEl:pj,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){uj("nulling",this),fj=hj=pj=mj=gj=vj=yj=bj=Ej=$j=jj=xj=_j=wj=Cj=Tj=Nj=kj=Sj=nT.dragged=nT.ghost=nT.clone=nT.active=null,Wj.forEach((function(e){e.checked=!0})),Wj.length=Mj=Rj=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":hj&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,i=0,o=n.length,r=this.options;i1&&(RT.forEach((function(e){i.addAnimationState({target:e,rect:jT?UO(e):o}),ij(e),e.fromRect=o,t.removeAnimationState(e)})),jT=!1,function(e,t){RT.forEach((function(n,i){var o=t.children[n.sortableIndex+(e?Number(i):0)];o?t.insertBefore(n,o):t.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(e){var t=e.sortable,n=e.isOwner,i=e.insertion,o=e.activeSortable,r=e.parentEl,a=e.putSortable,s=this.options;if(i){if(n&&o._hideClone(),OT=!1,s.animation&&RT.length>1&&(jT||!n&&!o.options.sort&&!a)){var l=UO(ET,!1,!0,!0);RT.forEach((function(e){e!==ET&&(nj(e,l),r.appendChild(e))})),jT=!0}if(!n)if(jT||LT(),RT.length>1){var c=MT;o._showClone(t),o.options.animation&&!MT&&c&&AT.forEach((function(e){o.addAnimationState({target:e,rect:$T}),e.fromRect=$T,e.thisAnimationDuration=null}))}else o._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,n=e.isOwner,i=e.activeSortable;if(RT.forEach((function(e){e.thisAnimationDuration=null})),i.options.animation&&!n&&i.multiDrag.isMultiDrag){$T=_O({},t);var o=VO(ET,!0);$T.top-=o.f,$T.left-=o.e}},dragOverAnimationComplete:function(){jT&&(jT=!1,LT())},drop:function(e){var t=e.originalEvent,n=e.rootEl,i=e.parentEl,o=e.sortable,r=e.dispatchSortableEvent,a=e.oldIndex,s=e.putSortable,l=s||this.sortable;if(t){var c=this.options,u=i.children;if(!TT)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),zO(ET,c.selectedClass,!~RT.indexOf(ET)),~RT.indexOf(ET))RT.splice(RT.indexOf(ET),1),ST=null,lj({sortable:o,rootEl:n,name:"deselect",targetEl:ET,originalEvent:t});else{if(RT.push(ET),lj({sortable:o,rootEl:n,name:"select",targetEl:ET,originalEvent:t}),t.shiftKey&&ST&&o.el.contains(ST)){var d,h,p=qO(ST),m=qO(ET);if(~p&&~m&&p!==m)for(m>p?(h=p,d=m):(h=m,d=p+1);h1){var f=UO(ET),g=qO(ET,":not(."+this.options.selectedClass+")");if(!OT&&c.animation&&(ET.thisAnimationDuration=null),l.captureAnimationState(),!OT&&(c.animation&&(ET.fromRect=f,RT.forEach((function(e){if(e.thisAnimationDuration=null,e!==ET){var t=jT?UO(e):f;e.fromRect=t,l.addAnimationState({target:e,rect:t})}}))),LT(),RT.forEach((function(e){u[g]?i.insertBefore(e,u[g]):i.appendChild(e),g++})),a===qO(ET))){var y=!1;RT.forEach((function(e){e.sortableIndex===qO(e)||(y=!0)})),y&&r("update")}RT.forEach((function(e){ij(e)})),l.animateAll()}kT=l}(n===i||s&&"clone"!==s.lastPutMode)&&AT.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}},nullingGlobal:function(){this.isMultiDrag=TT=!1,AT.length=0},destroyGlobal:function(){this._deselectMultiDrag(),NO(document,"pointerup",this._deselectMultiDrag),NO(document,"mouseup",this._deselectMultiDrag),NO(document,"touchend",this._deselectMultiDrag),NO(document,"keydown",this._checkKeyDown),NO(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(void 0!==TT&&TT||kT!==this.sortable||e&&DO(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;RT.length;){var t=RT[0];zO(t,this.options.selectedClass,!1),RT.shift(),lj({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvent:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},_O(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[oj];t&&t.options.multiDrag&&!~RT.indexOf(e)&&(kT&&kT!==t&&(kT.multiDrag._deselectMultiDrag(),kT=t),zO(e,t.options.selectedClass,!0),RT.push(e))},deselect:function(e){var t=e.parentNode[oj],n=RT.indexOf(e);t&&t.options.multiDrag&&~n&&(zO(e,t.options.selectedClass,!1),RT.splice(n,1))}},eventProperties:function(){var e,t=this,n=[],i=[];return RT.forEach((function(e){var o;n.push({multiDragElement:e,index:e.sortableIndex}),o=jT&&e!==ET?-1:jT?qO(e,":not(."+t.options.selectedClass+")"):qO(e),i.push({multiDragElement:e,index:o})})),{items:(e=RT,function(e){if(Array.isArray(e))return SO(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return SO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?SO(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),clones:[].concat(AT),oldIndicies:n,newIndicies:i}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})},Sortable:nT,Swap:function(){function e(){this.defaults={swapClass:"sortable-swap-highlight"}}return e.prototype={dragStart:function(e){var t=e.dragEl;bT=t},dragOverValid:function(e){var t=e.completed,n=e.target,i=e.onMove,o=e.activeSortable,r=e.changed,a=e.cancel;if(o.options.swap){var s=this.sortable.el,l=this.options;if(n&&n!==s){var c=bT;!1!==i(n)?(zO(n,l.swapClass,!0),bT=n):bT=null,c&&c!==bT&&zO(c,l.swapClass,!1)}r(),t(!0),a()}},drop:function(e){var t,n,i,o,r,a,s=e.activeSortable,l=e.putSortable,c=e.dragEl,u=l||this.sortable,d=this.options;bT&&zO(bT,d.swapClass,!1),bT&&(d.swap||l&&l.options.swap)&&c!==bT&&(u.captureAnimationState(),u!==s&&s.captureAnimationState(),n=bT,r=(t=c).parentNode,a=n.parentNode,r&&a&&!r.isEqualNode(n)&&!a.isEqualNode(t)&&(i=qO(t),o=qO(n),r.isEqualNode(a)&&il(e.element)))}function u(e){e.forEach((e=>{!function(e,t,n){const i=e.children[n]||null;e.insertBefore(t,i)}(e.parentElement,e.element,e.oldIndex)}))}function d(e,t){const n=m(e),i={parentElement:e.from};let o=[];switch(n){case"normal":o=[{element:e.item,newIndex:e.newIndex,oldIndex:e.oldIndex,parentElement:e.from}];break;case"swap":o=[{element:e.item,oldIndex:e.oldIndex,newIndex:e.newIndex,...i},{element:e.swapItem,oldIndex:e.newIndex,newIndex:e.oldIndex,...i}];break;case"multidrag":o=e.oldIndicies.map(((t,n)=>({element:t.multiDragElement,oldIndex:t.index,newIndex:e.newIndicies[n].index,...i})))}const r=function(e,t){return e.map((e=>({...e,item:t[e.oldIndex]}))).sort(((e,t)=>e.oldIndex-t.oldIndex))}(o,t);return r}function h(e,t){const n=[...t];return e.concat().reverse().forEach((e=>n.splice(e.oldIndex,1))),n}function p(e,t,n,i){const o=[...t];return e.forEach((e=>{const t=i&&n&&i(e.item,n);o.splice(e.newIndex,0,t||e.item)})),o}function m(e){return e.oldIndicies&&e.oldIndicies.length>0?"multidrag":e.swapItem?"swap":"normal"}s(t.exports,"Sortable",(()=>$882b6d93070905b3$re_export$Sortable)),s(t.exports,"Direction",(()=>$882b6d93070905b3$re_export$Direction)),s(t.exports,"DOMRect",(()=>$882b6d93070905b3$re_export$DOMRect)),s(t.exports,"GroupOptions",(()=>$882b6d93070905b3$re_export$GroupOptions)),s(t.exports,"MoveEvent",(()=>$882b6d93070905b3$re_export$MoveEvent)),s(t.exports,"Options",(()=>$882b6d93070905b3$re_export$Options)),s(t.exports,"PullResult",(()=>$882b6d93070905b3$re_export$PullResult)),s(t.exports,"PutResult",(()=>$882b6d93070905b3$re_export$PutResult)),s(t.exports,"SortableEvent",(()=>$882b6d93070905b3$re_export$SortableEvent)),s(t.exports,"SortableOptions",(()=>$882b6d93070905b3$re_export$SortableOptions)),s(t.exports,"Utils",(()=>$882b6d93070905b3$re_export$Utils)),s(t.exports,"ReactSortable",(()=>g));const f={dragging:null};class g extends o.Component{constructor(e){super(e),this.ref=(0,o.createRef)();const t=[...e.list].map((e=>Object.assign(e,{chosen:!1,selected:!1})));e.setList(t,this.sortable,f),a(r)(!e.plugins,'\nPlugins prop is no longer supported.\nInstead, mount it with "Sortable.mount(new MultiDrag())"\nPlease read the updated README.md at https://github.com/SortableJS/react-sortablejs.\n ')}componentDidMount(){if(null===this.ref.current)return;const e=this.makeOptions();a(n).create(this.ref.current,e)}componentDidUpdate(e){e.disabled!==this.props.disabled&&this.sortable&&this.sortable.option("disabled",this.props.disabled)}render(){const{tag:e,style:t,className:n,id:i}=this.props,r={style:t,className:n,id:i},a=e&&null!==e?e:"div";return(0,o.createElement)(a,{ref:this.ref,...r},this.getChildren())}getChildren(){const{children:e,dataIdAttr:t,selectedClass:n="sortable-selected",chosenClass:r="sortable-chosen",dragClass:s="sortable-drag",fallbackClass:l="sortable-falback",ghostClass:c="sortable-ghost",swapClass:u="sortable-swap-highlight",filter:d="sortable-filter",list:h}=this.props;if(!e||null==e)return null;const p=t||"data-id";return o.Children.map(e,((e,t)=>{if(void 0===e)return;const s=h[t]||{},{className:l}=e.props,c="string"==typeof d&&{[d.replace(".","")]:!!s.filtered},u=a(i)(l,{[n]:s.selected,[r]:s.chosen,...c});return(0,o.cloneElement)(e,{[p]:e.key,className:u})}))}get sortable(){const e=this.ref.current;if(null===e)return null;const t=Object.keys(e).find((e=>e.includes("Sortable")));return t?e[t]:null}makeOptions(){const e=function(e){const{list:t,setList:n,children:i,tag:o,style:r,className:a,clone:s,onAdd:l,onChange:c,onChoose:u,onClone:d,onEnd:h,onFilter:p,onRemove:m,onSort:f,onStart:g,onUnchoose:y,onUpdate:v,onMove:b,onSpill:w,onSelect:x,onDeselect:C,..._}=e;return _}(this.props);return["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"].forEach((t=>e[t]=this.prepareOnHandlerPropAndDOM(t))),["onChange","onClone","onFilter","onSort"].forEach((t=>e[t]=this.prepareOnHandlerProp(t))),{...e,onMove:(e,t)=>{const{onMove:n}=this.props,i=e.willInsertAfter||-1;if(!n)return i;const o=n(e,t,this.sortable,f);return void 0!==o&&o}}}prepareOnHandlerPropAndDOM(e){return t=>{this.callOnHandlerProp(t,e),this[e](t)}}prepareOnHandlerProp(e){return t=>{this.callOnHandlerProp(t,e)}}callOnHandlerProp(e,t){const n=this.props[t];n&&n(e,this.sortable,f)}onAdd(e){const{list:t,setList:n,clone:i}=this.props,o=d(e,[...f.dragging.props.list]);c(o),n(p(o,t,e,i).map((e=>Object.assign(e,{selected:!1}))),this.sortable,f)}onRemove(e){const{list:t,setList:n}=this.props,i=m(e),o=d(e,t);u(o);let s=[...t];if("clone"!==e.pullMode)s=h(o,s);else{let t=o;switch(i){case"multidrag":t=o.map(((t,n)=>({...t,element:e.clones[n]})));break;case"normal":t=o.map((t=>({...t,element:e.clone})));break;default:a(r)(!0,`mode "${i}" cannot clone. Please remove "props.clone" from when using the "${i}" plugin`)}c(t),o.forEach((t=>{const n=t.oldIndex,i=this.props.clone(t.item,e);s.splice(n,1,i)}))}s=s.map((e=>Object.assign(e,{selected:!1}))),n(s,this.sortable,f)}onUpdate(e){const{list:t,setList:n}=this.props,i=d(e,t);c(i),u(i);const o=function(e,t){return p(e,h(e,t))}(i,t);return n(o,this.sortable,f)}onStart(){f.dragging=this}onEnd(){f.dragging=null}onChoose(e){const{list:t,setList:n}=this.props;n(t.map(((t,n)=>{let i=t;return n===e.oldIndex&&(i=Object.assign(t,{chosen:!0})),i})),this.sortable,f)}onUnchoose(e){const{list:t,setList:n}=this.props;n(t.map(((t,n)=>{let i=t;return n===e.oldIndex&&(i=Object.assign(i,{chosen:!1})),i})),this.sortable,f)}onSpill(e){const{removeOnSpill:t,revertOnSpill:n}=this.props;t&&!n&&l(e.item)}onSelect(e){const{list:t,setList:n}=this.props,i=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((t=>{const n=t.index;if(-1===n)return console.log(`"${e.type}" had indice of "${t.index}", which is probably -1 and doesn't usually happen here.`),void console.log(e);i[n].selected=!0})),n(i,this.sortable,f)}onDeselect(e){const{list:t,setList:n}=this.props,i=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((e=>{const t=e.index;-1!==t&&(i[t].selected=!0)})),n(i,this.sortable,f)}}var y,v;((t,n,i)=>{((t,n,i)=>{n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i})(t,"symbol"!=typeof n?n+"":n,i)})(g,"defaultProps",{clone:e=>e}),y=t.exports,v={},Object.keys(v).forEach((function(e){"default"===e||"__esModule"===e||y.hasOwnProperty(e)||Object.defineProperty(y,e,{enumerable:!0,get:function(){return v[e]}})}))}(vO);var VT=vO.exports;const BT=window.React.useCallback,WT=window.React.useEffect,UT=window.React.useRef,YT=({list:e,setList:t,clone:n=!1,parentList:i=null,parentId:o=null,columnIndex:r=null,className:a="",sort:s=!0,children:l,style:c,useHandle:u=!1})=>{const d=UT(null),h=UT(!1);WT((()=>()=>{if(d.current&&d.current.sortable)try{d.current.sortable.destroy()}catch(e){console.warn("Error destroying sortable:",e)}}),[]);const p=BT((n=>{var a;if(!h.current)try{let s;h.current=!0,null!=(null==(a=n.to)?void 0:a.querySelector(".yaymail-customizer-email-global-header-footer-container"))&&(n.oldIndex=n.oldIndex?n.oldIndex-1:0,n.newIndex=n.newIndex?n.newIndex-1:0),s=null!=i&&null!=o&&null!=r?f$(n,i,o,r):f$(n,e),s&&t(s.addedList??[],{elementName:s.addedElementName??"",action:"added"})}catch(s){console.error("Error in handleOnAdd:",s)}finally{setTimeout((()=>{h.current=!1}),200)}}),[e,t,i]),m=BT((n=>{var o,r,a,s,l;if(h.current)return;try{h.current=!0,null!=(null==(o=n.to)?void 0:o.querySelector(".yaymail-customizer-email-global-header-footer-container"))&&(n.oldIndex=n.oldIndex?n.oldIndex-1:0,n.newIndex=n.newIndex?n.newIndex-1:0);const s=n.item.dataset.yaymailElementId;if(!s)return console.debug("YayMail: Please provide Element data in data attribute"),null;const l=p$(n,e);if(null==l)return;const c=null==(r=s$(s,l))?void 0:r.name;if(null===i)return void t(l,{elementName:c,action:"moved"});const u=null==(a=l[0])?void 0:a.parentId;if(null==u)return;const d=structuredClone(i);let p=s$(u,d);if(!p)return;p={...p,children:l},c$(u,d,p),t(d,{elementName:c,action:"moved"})}catch(g){console.error("Error in handleOnSort:",g)}finally{setTimeout((()=>{h.current=!1}),200)}const c=n.item.dataset.yaymailElementId;if(!c)return console.debug("YayMail: Please provide Element data in data attribute"),null;const u=p$(n,e);if(null==u)return;const d=null==(s=s$(c,u))?void 0:s.name;if(null===i)return void t(u,{elementName:d,action:"moved"});const p=null==(l=u[0])?void 0:l.parentId;if(null==p)return;const m=structuredClone(i);let f=s$(p,m);f&&(f={...f,children:u},c$(p,m,f),t(m,{elementName:d,action:"moved"}))}),[e,t,i]);return Mn.jsx(VT.ReactSortable,{ref:d,group:{name:"yaymail",...n?{pull:"clone",put:!1}:{}},list:e,onAdd:p,onSort:m,setList:()=>!1,filter:`.${a$},.yaymail-sortable-static`,preventOnFilter:!0,ghostClass:"yaymail-sortable-ghost",...n?{}:{animation:100,easing:"ease-in-out"},className:a,sort:s,swapThreshold:1,invertSwap:!0,direction:"vertical",handle:u?".yaymail-chosen-element__handle-drag":void 0,style:c,onMove:e=>-1===e.related.className.indexOf("yaymail-sortable-static"),children:l})},ZT=(0,window.React.createContext)({});function GT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function JT(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function eN(e){return e<=1?"".concat(100*Number(e),"%"):e}function tN(e){return 1===e.length?"0"+e:String(e)}function nN(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function iN(e){return oN(e)/255}function oN(e){return parseInt(e,16)}var rN={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 aN(e){var t,n,i,o={r:0,g:0,b:0},r=1,a=null,s=null,l=null,c=!1,u=!1;return"string"==typeof e&&(e=function(e){if(0===(e=e.trim().toLowerCase()).length)return!1;var t=!1;if(rN[e])e=rN[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=uN.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=uN.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=uN.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=uN.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=uN.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=uN.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=uN.hex8.exec(e))?{r:oN(n[1]),g:oN(n[2]),b:oN(n[3]),a:iN(n[4]),format:t?"name":"hex8"}:(n=uN.hex6.exec(e))?{r:oN(n[1]),g:oN(n[2]),b:oN(n[3]),format:t?"name":"hex"}:(n=uN.hex4.exec(e))?{r:oN(n[1]+n[1]),g:oN(n[2]+n[2]),b:oN(n[3]+n[3]),a:iN(n[4]+n[4]),format:t?"name":"hex8"}:!!(n=uN.hex3.exec(e))&&{r:oN(n[1]+n[1]),g:oN(n[2]+n[2]),b:oN(n[3]+n[3]),format:t?"name":"hex"}}(e)),"object"==typeof e&&(dN(e.r)&&dN(e.g)&&dN(e.b)?(t=e.r,n=e.g,i=e.b,o={r:255*JT(t,255),g:255*JT(n,255),b:255*JT(i,255)},c=!0,u="%"===String(e.r).substr(-1)?"prgb":"rgb"):dN(e.h)&&dN(e.s)&&dN(e.v)?(a=eN(e.s),s=eN(e.v),o=function(e,t,n){e=6*JT(e,360),t=JT(t,100),n=JT(n,100);var i=Math.floor(e),o=e-i,r=n*(1-t),a=n*(1-o*t),s=n*(1-(1-o)*t),l=i%6;return{r:255*[n,a,r,r,s,n][l],g:255*[s,n,n,a,r,r][l],b:255*[r,r,s,n,n,a][l]}}(e.h,a,s),c=!0,u="hsv"):dN(e.h)&&dN(e.s)&&dN(e.l)&&(a=eN(e.s),l=eN(e.l),o=function(e,t,n){var i,o,r;if(e=JT(e,360),t=JT(t,100),n=JT(n,100),0===t)o=n,r=n,i=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;i=nN(s,a,e+1/3),o=nN(s,a,e),r=nN(s,a,e-1/3)}return{r:255*i,g:255*o,b:255*r}}(e.h,a,l),c=!0,u="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=function(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}(r),{ok:c,format:e.format||u,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:r}}var sN="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),lN="[\\s|\\(]+(".concat(sN,")[,|\\s]+(").concat(sN,")[,|\\s]+(").concat(sN,")\\s*\\)?"),cN="[\\s|\\(]+(".concat(sN,")[,|\\s]+(").concat(sN,")[,|\\s]+(").concat(sN,")[,|\\s]+(").concat(sN,")\\s*\\)?"),uN={CSS_UNIT:new RegExp(sN),rgb:new RegExp("rgb"+lN),rgba:new RegExp("rgba"+cN),hsl:new RegExp("hsl"+lN),hsla:new RegExp("hsla"+cN),hsv:new RegExp("hsv"+lN),hsva:new RegExp("hsva"+cN),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 dN(e){return Boolean(uN.CSS_UNIT.exec(String(e)))}var hN=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function pN(e){var t=function(e,t,n){e=JT(e,255),t=JT(t,255),n=JT(n,255);var i=Math.max(e,t,n),o=Math.min(e,t,n),r=0,a=i,s=i-o,l=0===i?0:s/i;if(i===o)r=0;else{switch(i){case e:r=(t-n)/s+(t=60&&Math.round(e.h)<=240?n?Math.round(e.h)-2*t:Math.round(e.h)+2*t:n?Math.round(e.h)+2*t:Math.round(e.h)-2*t)<0?i+=360:i>=360&&(i-=360),i}function gN(e,t,n){return 0===e.h&&0===e.s?e.s:((i=n?e.s-.16*t:4===t?e.s+.16:e.s+.05*t)>1&&(i=1),n&&5===t&&i>.1&&(i=.1),i<.06&&(i=.06),Number(i.toFixed(2)));var i}function yN(e,t,n){var i;return(i=n?e.v+.05*t:e.v-.15*t)>1&&(i=1),Number(i.toFixed(2))}function vN(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],i=aN(e),o=5;o>0;o-=1){var r=pN(i),a=mN(aN({h:fN(r,o,!0),s:gN(r,o,!0),v:yN(r,o,!0)}));n.push(a)}n.push(mN(i));for(var s=1;s<=4;s+=1){var l=pN(i),c=mN(aN({h:fN(l,s),s:gN(l,s),v:yN(l,s)}));n.push(c)}return"dark"===t.theme?hN.map((function(e){var i,o,r,a=e.index,s=e.opacity;return mN((i=aN(t.backgroundColor||"#141414"),r=100*s/100,{r:((o=aN(n[a])).r-i.r)*r+i.r,g:(o.g-i.g)*r+i.g,b:(o.b-i.b)*r+i.b}))})):n}var bN={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},wN={},xN={};Object.keys(bN).forEach((function(e){wN[e]=vN(bN[e]),wN[e].primary=wN[e][5],xN[e]=vN(bN[e],{theme:"dark",backgroundColor:"#141414"}),xN[e].primary=xN[e][5]}));var CN=wN.blue;function _N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function SN(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{}).mark;return e?e.startsWith("data-")?e:"data-".concat(e):"rc-util-key"}function TN(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function NN(e){return Array.from((ON.get(e)||e).children).filter((function(e){return"STYLE"===e.tagName}))}function LN(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("undefined"==typeof window||!window.document||!window.document.createElement)return null;var n=t.csp,i=t.prepend,o=document.createElement("style");o.setAttribute(AN,function(e){return"queue"===e?"prependQueue":e?"prepend":"append"}(i)),null!=n&&n.nonce&&(o.nonce=null==n?void 0:n.nonce),o.innerHTML=e;var r=TN(t),a=r.firstChild;if(i){if("queue"===i){var s=NN(r).filter((function(e){return["prepend","prependQueue"].includes(e.getAttribute(AN))}));if(s.length)return r.insertBefore(o,s[s.length-1].nextSibling),o}r.insertBefore(o,a)}else r.appendChild(o);return o}function IN(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}const DN=window.React,HN=window.React.useContext,PN=window.React.useEffect;function zN(e,t){RN(e,"[@ant-design/icons] ".concat(t))}function FN(e){return"object"===KT(e)&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"===KT(e.icon)||"function"==typeof e.icon)}function VN(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var i=e[n];return"class"===n?(t.className=i,delete t.class):t[n]=i,t}),{})}function BN(e,t,n){return n?DN.createElement(e.tag,SN(SN({key:t},VN(e.attrs)),n),(e.children||[]).map((function(n,i){return BN(n,"".concat(t,"-").concat(e.tag,"-").concat(i))}))):DN.createElement(e.tag,SN({key:t},VN(e.attrs)),(e.children||[]).map((function(n,i){return BN(n,"".concat(t,"-").concat(e.tag,"-").concat(i))})))}function WN(e){return vN(e)[0]}function UN(e){return e?Array.isArray(e)?e:[e]:[]}var YN={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},ZN=function(e){var t=HN(ZT),n=t.csp,i=t.prefixCls,o="\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";i&&(o=o.replace(/anticon/g,i)),PN((function(){var t,i=function(e){return IN(e)!==(null==e?void 0:e.ownerDocument)}(t=e.current)?IN(t):null;!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){var n=ON.get(e);if(!n||!function(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}(document,n)){var i=LN("",t),o=i.parentNode;ON.set(e,o),e.removeChild(i)}}(TN(n),n);var i,o,r,a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return NN(TN(t)).find((function(n){return n.getAttribute(jN(t))===e}))}(t,n);if(a)return null!==(i=n.csp)&&void 0!==i&&i.nonce&&a.nonce!==(null===(o=n.csp)||void 0===o?void 0:o.nonce)&&(a.nonce=null===(r=n.csp)||void 0===r?void 0:r.nonce),a.innerHTML!==e&&(a.innerHTML=e),a;var s=LN(e,n);s.setAttribute(jN(n),t)}(o,"@ant-design-icons",{prepend:!0,csp:n,attachTo:i})}),[])},GN=["icon","className","onClick","style","primaryColor","secondaryColor"];const qN=window.React;var KN={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1},QN=function(e){var t=e.icon,n=e.className,i=e.onClick,o=e.style,r=e.primaryColor,a=e.secondaryColor,s=XT(e,GN),l=qN.useRef(),c=KN;if(r&&(c={primaryColor:r,secondaryColor:a||WN(r)}),ZN(l),zN(FN(t),"icon should be icon definiton, but got ".concat(t)),!FN(t))return null;var u=t;return u&&"function"==typeof u.icon&&(u=SN(SN({},u),{},{icon:u.icon(c.primaryColor,c.secondaryColor)})),BN(u.icon,"svg-".concat(u.name),SN(SN({className:n,onClick:i,style:o,"data-icon":u.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},s),{},{ref:l}))};QN.displayName="IconReact",QN.getTwoToneColors=function(){return SN({},KN)},QN.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;KN.primaryColor=t,KN.secondaryColor=n||WN(t),KN.calculated=!!n};const XN=QN;function JN(e){var t=qT(UN(e),2),n=t[0],i=t[1];return XN.setTwoToneColors({primaryColor:n,secondaryColor:i})}var eL=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];const tL=window.React;JN(CN.primary);var nL=tL.forwardRef((function(e,t){var n,i=e.className,o=e.icon,r=e.spin,a=e.rotate,s=e.tabIndex,l=e.onClick,c=e.twoToneColor,u=XT(e,eL),d=tL.useContext(ZT),h=d.prefixCls,p=void 0===h?"anticon":h,m=d.rootClassName,f=_$(m,p,(QT(n={},"".concat(p,"-").concat(o.name),!!o.name),QT(n,"".concat(p,"-spin"),!!r||"loading"===o.name),n),i),g=s;void 0===g&&l&&(g=-1);var y=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,v=qT(UN(c),2),b=v[0],w=v[1];return tL.createElement("span",Q_({role:"img","aria-label":o.name},u,{ref:t,tabIndex:g,onClick:l,className:f}),tL.createElement(XN,{icon:o,primaryColor:b,secondaryColor:w,style:y}))}));nL.displayName="AntdIcon",nL.getTwoToneColor=function(){var e=XN.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},nL.setTwoToneColor=JN;const iL=nL,oL={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M264 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm496 424c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496zm144 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"align-center",theme:"outlined"},rL=window.React;var aL=function(e,t){return rL.createElement(iL,Q_({},e,{ref:t,icon:oL}))};const sL=rL.forwardRef(aL),lL={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"align-left",theme:"outlined"},cL=window.React;var uL=function(e,t){return cL.createElement(iL,Q_({},e,{ref:t,icon:lL}))};const dL=cL.forwardRef(uL),hL={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 158H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 424H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 212H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"align-right",theme:"outlined"},pL=window.React;var mL=function(e,t){return pL.createElement(iL,Q_({},e,{ref:t,icon:hL}))};const fL=pL.forwardRef(mL),gL={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"},yL=window.React;var vL=function(e,t){return yL.createElement(iL,Q_({},e,{ref:t,icon:gL}))};const bL=yL.forwardRef(vL),wL={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M740 161c-61.8 0-112 50.2-112 112 0 50.1 33.1 92.6 78.5 106.9v95.9L320 602.4V318.1c44.2-15 76-56.9 76-106.1 0-61.8-50.2-112-112-112s-112 50.2-112 112c0 49.2 31.8 91 76 106.1V706c-44.2 15-76 56.9-76 106.1 0 61.8 50.2 112 112 112s112-50.2 112-112c0-49.2-31.8-91-76-106.1v-27.8l423.5-138.7a50.52 50.52 0 0034.9-48.2V378.2c42.9-15.8 73.6-57 73.6-105.2 0-61.8-50.2-112-112-112zm-504 51a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm96 600a48.01 48.01 0 01-96 0 48.01 48.01 0 0196 0zm408-491a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"branches",theme:"outlined"},xL=window.React;var CL=function(e,t){return xL.createElement(iL,Q_({},e,{ref:t,icon:wL}))};const _L=xL.forwardRef(CL),SL={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},kL=window.React;var EL=function(e,t){return kL.createElement(iL,Q_({},e,{ref:t,icon:SL}))};const $L=kL.forwardRef(EL),ML={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M689 165.1L308.2 493.5c-10.9 9.4-10.9 27.5 0 37L689 858.9c14.2 12.2 35 1.2 35-18.5V183.6c0-19.7-20.8-30.7-35-18.5z"}}]},name:"caret-left",theme:"outlined"},RL=window.React;var AL=function(e,t){return RL.createElement(iL,Q_({},e,{ref:t,icon:ML}))};const OL=RL.forwardRef(AL),jL={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},TL=window.React;var NL=function(e,t){return TL.createElement(iL,Q_({},e,{ref:t,icon:jL}))};const LL=TL.forwardRef(NL),IL={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},DL=window.React;var HL=function(e,t){return DL.createElement(iL,Q_({},e,{ref:t,icon:IL}))};const PL=DL.forwardRef(HL),zL={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"}}]},name:"close-circle",theme:"filled"},FL=window.React;var VL=function(e,t){return FL.createElement(iL,Q_({},e,{ref:t,icon:zL}))};const BL=FL.forwardRef(VL),WL={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z"}},{tag:"path",attrs:{d:"M376.9 656.4c1.8-33.5 15.7-64.7 39.5-88.6 25.4-25.5 60-39.8 96-39.8 36.2 0 70.3 14.1 96 39.8 1.4 1.4 2.7 2.8 4.1 4.3l-25 19.6a8 8 0 003 14.1l98.2 24c5 1.2 9.9-2.6 9.9-7.7l.5-101.3c0-6.7-7.6-10.5-12.9-6.3L663 532.7c-36.6-42-90.4-68.6-150.5-68.6-107.4 0-195 85.1-199.4 191.7-.2 4.5 3.4 8.3 8 8.3H369c4.2-.1 7.7-3.4 7.9-7.7zM703 664h-47.9c-4.2 0-7.7 3.3-8 7.6-1.8 33.5-15.7 64.7-39.5 88.6-25.4 25.5-60 39.8-96 39.8-36.2 0-70.3-14.1-96-39.8-1.4-1.4-2.7-2.8-4.1-4.3l25-19.6a8 8 0 00-3-14.1l-98.2-24c-5-1.2-9.9 2.6-9.9 7.7l-.4 101.4c0 6.7 7.6 10.5 12.9 6.3l23.2-18.2c36.6 42 90.4 68.6 150.5 68.6 107.4 0 195-85.1 199.4-191.7.2-4.5-3.4-8.3-8-8.3z"}}]},name:"cloud-sync",theme:"outlined"},UL=window.React;var YL=function(e,t){return UL.createElement(iL,Q_({},e,{ref:t,icon:WL}))};const ZL=UL.forwardRef(YL),GL={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M518.3 459a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V856c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V613.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 459z"}},{tag:"path",attrs:{d:"M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7-23.5-24.2-36-56.8-34.9-90.6.9-26.4 9.9-51.2 26.2-72.1 16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 01-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3z"}}]},name:"cloud-upload",theme:"outlined"},qL=window.React;var KL=function(e,t){return qL.createElement(iL,Q_({},e,{ref:t,icon:GL}))};const QL=qL.forwardRef(KL),XL={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"},JL=window.React;var eI=function(e,t){return JL.createElement(iL,Q_({},e,{ref:t,icon:XL}))};const tI=JL.forwardRef(eI),nI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},iI=window.React;var oI=function(e,t){return iI.createElement(iL,Q_({},e,{ref:t,icon:nI}))};const rI=iI.forwardRef(oI),aI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zM512 734.2c-62.1 0-112.6-50.5-112.6-112.6S449.9 509 512 509s112.6 50.5 112.6 112.6S574.1 734.2 512 734.2zm0-160.9c-26.6 0-48.2 21.6-48.2 48.3 0 26.6 21.6 48.3 48.2 48.3s48.2-21.6 48.2-48.3c0-26.6-21.6-48.3-48.2-48.3z"}}]},name:"crown",theme:"filled"},sI=window.React;var lI=function(e,t){return sI.createElement(iL,Q_({},e,{ref:t,icon:aI}))};const cI=sI.forwardRef(lI),uI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M112 476h160v72H112zm320 0h160v72H432zm320 0h160v72H752z"}}]},name:"dash",theme:"outlined"},dI=window.React;var hI=function(e,t){return dI.createElement(iL,Q_({},e,{ref:t,icon:uI}))};const pI=dI.forwardRef(hI),mI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},fI=window.React;var gI=function(e,t){return fI.createElement(iL,Q_({},e,{ref:t,icon:mI}))};const yI=fI.forwardRef(gI),vI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M476 399.1c0-3.9-3.1-7.1-7-7.1h-42c-3.8 0-7 3.2-7 7.1V484h-84.5c-4.1 0-7.5 3.1-7.5 7v42c0 3.8 3.4 7 7.5 7H420v84.9c0 3.9 3.2 7.1 7 7.1h42c3.9 0 7-3.2 7-7.1V540h84.5c4.1 0 7.5-3.2 7.5-7v-42c0-3.9-3.4-7-7.5-7H476v-84.9zM560.5 704h-225c-4.1 0-7.5 3.2-7.5 7v42c0 3.8 3.4 7 7.5 7h225c4.1 0 7.5-3.2 7.5-7v-42c0-3.8-3.4-7-7.5-7zm-7.1-502.6c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v704c0 17.7 14.3 32 32 32h512c17.7 0 32-14.3 32-32V397.3c0-8.5-3.4-16.6-9.4-22.6L553.4 201.4zM664 888H232V264h282.2L664 413.8V888zm190.2-581.4L611.3 72.9c-6-5.7-13.9-8.9-22.2-8.9H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h277l219 210.6V824c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V329.6c0-8.7-3.5-17-9.8-23z"}}]},name:"diff",theme:"outlined"},bI=window.React;var wI=function(e,t){return bI.createElement(iL,Q_({},e,{ref:t,icon:vI}))};const xI=bI.forwardRef(wI),CI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.3 506.3L781.7 405.6a7.23 7.23 0 00-11.7 5.7V476H548V254h64.8c6 0 9.4-7 5.7-11.7L517.7 114.7a7.14 7.14 0 00-11.3 0L405.6 242.3a7.23 7.23 0 005.7 11.7H476v222H254v-64.8c0-6-7-9.4-11.7-5.7L114.7 506.3a7.14 7.14 0 000 11.3l127.5 100.8c4.7 3.7 11.7.4 11.7-5.7V548h222v222h-64.8c-6 0-9.4 7-5.7 11.7l100.8 127.5c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.7-4.7.4-11.7-5.7-11.7H548V548h222v64.8c0 6 7 9.4 11.7 5.7l127.5-100.8a7.3 7.3 0 00.1-11.4z"}}]},name:"drag",theme:"outlined"},_I=window.React;var SI=function(e,t){return _I.createElement(iL,Q_({},e,{ref:t,icon:CI}))};const kI=_I.forwardRef(SI),EI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M484 443.1V528h-84.5c-4.1 0-7.5 3.1-7.5 7v42c0 3.8 3.4 7 7.5 7H484v84.9c0 3.9 3.2 7.1 7 7.1h42c3.9 0 7-3.2 7-7.1V584h84.5c4.1 0 7.5-3.2 7.5-7v-42c0-3.9-3.4-7-7.5-7H540v-84.9c0-3.9-3.1-7.1-7-7.1h-42c-3.8 0-7 3.2-7 7.1zm396-144.7H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder-add",theme:"outlined"},$I=window.React;var MI=function(e,t){return $I.createElement(iL,Q_({},e,{ref:t,icon:EI}))};const RI=$I.forwardRef(MI),AI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z"}}]},name:"form",theme:"outlined"},OI=window.React;var jI=function(e,t){return OI.createElement(iL,Q_({},e,{ref:t,icon:AI}))};const TI=OI.forwardRef(jI),NI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM512 533c-85.5 0-155.6 67.3-160 151.6a8 8 0 008 8.4h48.1c4.2 0 7.8-3.2 8.1-7.4C420 636.1 461.5 597 512 597s92.1 39.1 95.8 88.6c.3 4.2 3.9 7.4 8.1 7.4H664a8 8 0 008-8.4C667.6 600.3 597.5 533 512 533z"}}]},name:"frown",theme:"outlined"},LI=window.React;var II=function(e,t){return LI.createElement(iL,Q_({},e,{ref:t,icon:NI}))};const DI=LI.forwardRef(II),HI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M957.6 507.4L603.2 158.2a7.9 7.9 0 00-11.2 0L353.3 393.4a8.03 8.03 0 00-.1 11.3l.1.1 40 39.4-117.2 115.3a8.03 8.03 0 00-.1 11.3l.1.1 39.5 38.9-189.1 187H72.1c-4.4 0-8.1 3.6-8.1 8V860c0 4.4 3.6 8 8 8h344.9c2.1 0 4.1-.8 5.6-2.3l76.1-75.6 40.4 39.8a7.9 7.9 0 0011.2 0l117.1-115.6 40.1 39.5a7.9 7.9 0 0011.2 0l238.7-235.2c3.4-3 3.4-8 .3-11.2zM389.8 796.2H229.6l134.4-133 80.1 78.9-54.3 54.1zm154.8-62.1L373.2 565.2l68.6-67.6 171.4 168.9-68.6 67.6zM713.1 658L450.3 399.1 597.6 254l262.8 259-147.3 145z"}}]},name:"highlight",theme:"outlined"},PI=window.React;var zI=function(e,t){return PI.createElement(iL,Q_({},e,{ref:t,icon:HI}))};const FI=PI.forwardRef(zI),VI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z"}}]},name:"history",theme:"outlined"},BI=window.React;var WI=function(e,t){return BI.createElement(iL,Q_({},e,{ref:t,icon:VI}))};const UI=BI.forwardRef(WI),YI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},ZI=window.React;var GI=function(e,t){return ZI.createElement(iL,Q_({},e,{ref:t,icon:YI}))};const qI=ZI.forwardRef(GI),KI={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},QI=window.React;var XI=function(e,t){return QI.createElement(iL,Q_({},e,{ref:t,icon:KI}))};const JI=QI.forwardRef(XI),eD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"minus",theme:"outlined"},tD=window.React;var nD=function(e,t){return tD.createElement(iL,Q_({},e,{ref:t,icon:eD}))};const iD=tD.forwardRef(nD),oD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},rD=window.React;var aD=function(e,t){return rD.createElement(iL,Q_({},e,{ref:t,icon:oD}))};const sD=rD.forwardRef(aD),lD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},cD=window.React;var uD=function(e,t){return cD.createElement(iL,Q_({},e,{ref:t,icon:lD}))};const dD=cD.forwardRef(uD),hD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M112 476h72v72h-72zm182 0h72v72h-72zm364 0h72v72h-72zm182 0h72v72h-72zm-364 0h72v72h-72z"}}]},name:"small-dash",theme:"outlined"},pD=window.React;var mD=function(e,t){return pD.createElement(iL,Q_({},e,{ref:t,icon:hD}))};const fD=pD.forwardRef(mD);var gD={},yD="function"==typeof Symbol&&Symbol.for,vD=yD?Symbol.for("react.element"):60103,bD=yD?Symbol.for("react.portal"):60106,wD=yD?Symbol.for("react.fragment"):60107,xD=yD?Symbol.for("react.strict_mode"):60108,CD=yD?Symbol.for("react.profiler"):60114,_D=yD?Symbol.for("react.provider"):60109,SD=yD?Symbol.for("react.context"):60110,kD=yD?Symbol.for("react.async_mode"):60111,ED=yD?Symbol.for("react.concurrent_mode"):60111,$D=yD?Symbol.for("react.forward_ref"):60112,MD=yD?Symbol.for("react.suspense"):60113,RD=yD?Symbol.for("react.suspense_list"):60120,AD=yD?Symbol.for("react.memo"):60115,OD=yD?Symbol.for("react.lazy"):60116,jD=yD?Symbol.for("react.block"):60121,TD=yD?Symbol.for("react.fundamental"):60117,ND=yD?Symbol.for("react.responder"):60118,LD=yD?Symbol.for("react.scope"):60119;function ID(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case vD:switch(e=e.type){case kD:case ED:case wD:case CD:case xD:case MD:return e;default:switch(e=e&&e.$$typeof){case SD:case $D:case OD:case AD:case _D:return e;default:return t}}case bD:return t}}}function DD(e){return ID(e)===ED}gD.AsyncMode=kD,gD.ConcurrentMode=ED,gD.ContextConsumer=SD,gD.ContextProvider=_D,gD.Element=vD,gD.ForwardRef=$D,gD.Fragment=wD,gD.Lazy=OD,gD.Memo=AD,gD.Portal=bD,gD.Profiler=CD,gD.StrictMode=xD,gD.Suspense=MD,gD.isAsyncMode=function(e){return DD(e)||ID(e)===kD},gD.isConcurrentMode=DD,gD.isContextConsumer=function(e){return ID(e)===SD},gD.isContextProvider=function(e){return ID(e)===_D},gD.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===vD},gD.isForwardRef=function(e){return ID(e)===$D},gD.isFragment=function(e){return ID(e)===wD},gD.isLazy=function(e){return ID(e)===OD},gD.isMemo=function(e){return ID(e)===AD},gD.isPortal=function(e){return ID(e)===bD},gD.isProfiler=function(e){return ID(e)===CD},gD.isStrictMode=function(e){return ID(e)===xD},gD.isSuspense=function(e){return ID(e)===MD},gD.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===wD||e===ED||e===CD||e===xD||e===MD||e===RD||"object"==typeof e&&null!==e&&(e.$$typeof===OD||e.$$typeof===AD||e.$$typeof===_D||e.$$typeof===SD||e.$$typeof===$D||e.$$typeof===TD||e.$$typeof===ND||e.$$typeof===LD||e.$$typeof===jD)},gD.typeOf=ID;const HD=window.React;function PD(){for(var e=arguments.length,t=new Array(e),n=0;n{const{isFirst:t,isLast:n,handleMoveElementUp:i,handleMoveElementDown:o}=ZD(e);return Mn.jsx("div",{className:"yaymail-chosen-element__control-bar",onClick:e=>{e.stopPropagation()},children:Mn.jsxs("div",{className:"control-group",children:[Mn.jsx("span",{className:t?"disabled":"",children:Mn.jsx(LL,{onClick:i})}),"element"===e&&Mn.jsx("span",{className:"yaymail-chosen-element__handle-drag",children:Mn.jsx(kI,{})}),Mn.jsx("span",{className:n?"disabled":"",children:Mn.jsx($L,{onClick:o})})]})})},ZD=e=>{const t=eM((e=>{var t;return null==(t=e.chosenElement)?void 0:t.id})),n=eM((e=>e.swapWithNextElement)),i=eM((e=>e.swapWithPreviousElement)),o=eM((e=>e.swapGroupWithPreviousElement)),r=eM((e=>e.swapGroupWithNextElement)),a=eM((e=>e.list)),s=eM((e=>e.multiSelectedList));return{isFirst:"element"===e?UD((()=>!!t&&a[0].id===t),[t,a,s]):UD((()=>!(s.length<1)&&a[0].id===s[0].id),[s,a]),isLast:"element"===e?UD((()=>!!t&&a[a.length-1].id===t),[t,a,s]):UD((()=>!(s.length<1)&&a[a.length-1].id===s[s.length-1].id),[s,a]),handleMoveElementUp:()=>{((e="element")=>new Promise((t=>{const n=SA(".yaymail-customizer-main"),i=SA("element"===e?".yaymail-customizer-main .yaymail-chosen-element":".yaymail-customizer-main .yaymail-multi-selected"),o=SA(i).first().prev();i.css("z-index","40");const r=o.innerHeight();n.animate({scrollTop:Number(n.scrollTop())-Number(o.innerHeight())},"slow"),i.animate({bottom:r,opacity:.7},300,(function(){const n=i.innerHeight();o.animate({top:n,opacity:.7},"element"===e?100:0,(function(){i.css({bottom:"",zIndex:"",opacity:""}),o.css({top:"",opacity:""}),t(!0)}))}))})))(e).then((()=>{"element"===e?i(t??""):o(s)}))},handleMoveElementDown:()=>{((e="element")=>new Promise((t=>{const n=SA(".yaymail-customizer-main"),i=SA("element"===e?".yaymail-customizer-main .yaymail-chosen-element":".yaymail-customizer-main .yaymail-multi-selected"),o=SA(i).last().next();i.css("z-index","40");const r=o.innerHeight()??0;n.animate({scrollTop:Number(o.height())+Number(n.scrollTop())},"slow"),i.animate({top:r,opacity:.7},300,(function(){const n=i.innerHeight();o.animate({bottom:n,opacity:.7},"element"===e?100:0,(function(){i.css({top:"",zIndex:"",opacity:""}),o.css({bottom:"",opacity:""}),t(!0)}))}))})))(e).then((()=>{"element"===e?n(t??""):r(s)}))}}},GD=window.React.useCallback,qD=window.React.useEffect,KD=(e,t=!0,n,i)=>{const{boundaryElementSelectors:o,ignoredElementsCssSelectors:r,ignoredClassnames:a}=n||{},s=GD((e=>a&&a.some((t=>e.classList.contains(t)))),[a]),l=GD((e=>r&&r.some((t=>e.closest(t)))),[r]),c=GD((e=>o&&o.some((t=>e.matches(t)))),[o]),u=GD((n=>{if(!t)return;const i=n.target,r=c(i),a=!r&&(s(i)||l(i));(r||!o&&!a)&&e()}),[t,c,s,l,o,e]);qD((()=>{t?document.addEventListener("click",u):document.removeEventListener("click",u);const e=i?document.querySelectorAll(i):"";return e&&e.forEach((function(e){e.addEventListener("click",(e=>u(e)))})),()=>{document.removeEventListener("click",u),e&&e.forEach((function(e){e.removeEventListener("click",(e=>u(e)))}))}}),[u])},QD=e=>lO.createElement("svg",{"data-v-2503513a":"",x:"0px",y:"0px",width:"1em",height:"1em",viewBox:"0 0 60 60",...e},lO.createElement("g",{"data-v-2503513a":""},lO.createElement("path",{"data-v-2503513a":"",d:"M30,15c3.9,0,7-3.1,7-7s-3.1-7-7-7s-7,3.1-7,7S26.1,15,30,15z"}),lO.createElement("path",{"data-v-2503513a":"",d:"M30,45c-3.9,0-7,3.1-7,7s3.1,7,7,7s7-3.1,7-7S33.9,45,30,45z"}),lO.createElement("path",{"data-v-2503513a":"",d:"M30,23c-3.9,0-7,3.1-7,7s3.1,7,7,7s7-3.1,7-7S33.9,23,30,23z"}))),XD="_modal_header_title_11qgr_7",JD="_modal-header-right_11qgr_12",eH=({isLoading:e,okText:t,cancelText:n,onOk:i,onCancel:o,isButtonOkDisabled:r})=>Mn.jsxs("div",{className:"modal__footer",children:[Mn.jsx(Ct,{type:"primary",loading:e,onClick:i,disabled:r,children:__(t)},"ok"),Mn.jsx(Ct,{onClick:o,disabled:e,children:n??__("Cancel","yaymail")},"back")]}),tH=({content:e})=>Mn.jsx("div",{className:"_modal_header_11qgr_1",children:e}),nH=()=>Mn.jsx(Mn.Fragment,{children:Mn.jsx("h4",{className:XD,children:__("Are you sure you want to remove this element?","yaymail")})}),iH=({elementIds:e,isOpen:t,onClose:n})=>{const i=eM((e=>e.removeElements));return Mn.jsx(Gb,{title:Mn.jsx(tH,{content:Mn.jsx(nH,{})}),className:"yaymail-global__modal yaymail-remove-element__modal",open:t,onCancel:n,centered:!0,width:"500px",footer:Mn.jsx(eH,{onOk:()=>{i(e),n()},onCancel:()=>{n()},okText:"Yes, sure!"}),destroyOnClose:!0})},oH=window.React.useMemo,rH=window.React.useState,aH=({element:e})=>{const t=e.id,n=hM((e=>e.elements)),i=eM((e=>e.copiedElement)),o=eM((e=>e.chosenElement)),r=eM((e=>e.copiedStylesElement)),a=eM((e=>e.multiSelectedList.map((e=>e.id)))),s=oH((()=>a.length>1),[a]),l=eM((e=>e.copyElement)),c=eM((e=>e.copyStylesElement)),u=eM((e=>e.pasteElement)),d=eM((e=>e.pasteStylesElement)),h=eM((e=>e.duplicateElement)),[p,m]=rH(!1),[f,g]=Vb.useMessage({top:30,duration:1}),y=()=>{m(!0)},v=eM((e=>e.selectParentColumnElement)),b=oH((()=>null===i||!kA(n,i)),[i,kA]),w=oH((()=>null===r||!((e,t)=>null!==t&&null!==e&&e.type===t.type)(o,r)),[]),x=oH((()=>{const t=[{label:__("Duplicate","yaymail"),key:"duplicate",icon:Mn.jsx(rI,{}),onClick:()=>{h()}},...s?[]:[{label:__("Copy this element","yaymail"),key:"copy_element",icon:Mn.jsx(xI,{}),onClick:()=>{l(e),f.success("Element copied")}},{label:__("Paste element","yaymail"),key:"pasteElement",icon:Mn.jsx(TI,{}),disabled:b,onClick:()=>{u(),f.success("Element pasted")}},{label:__("Copy styles","yaymail"),key:"copy_styles",icon:Mn.jsx(FI,{}),onClick:()=>{c(),f.success("Styles copied")}},{label:__("Paste styles","yaymail"),key:"pasteStyles",icon:Mn.jsx(TI,{}),disabled:w,onClick:()=>{d(),f.success("Styles pasted")}}],{label:Mn.jsx(he,{title:__("This feature is available in the PRO version","yaymail"),children:Mn.jsx("span",{children:__("Save to library","yaymail")})}),key:"save_to_library",icon:Mn.jsx(RI,{}),disabled:!0},{label:__("Remove","yaymail"),key:"remove",icon:Mn.jsx(yI,{}),onClick:y}];return e.parentId&&!s&&t.push({label:__("Select parent","yaymail"),key:"selectParent",icon:Mn.jsx(_L,{}),onClick:()=>{v(e.parentId)}}),t}),[e.parentId,b,s]);return Mn.jsxs(Mn.Fragment,{children:[g,Mn.jsxs("div",{className:"yaymail-customizer-element__extra-options",onClick:e=>{e.stopPropagation()},children:[Mn.jsx(vn,{menu:{items:x},trigger:["click"],children:Mn.jsx("div",{className:"extra-options__activator",children:Mn.jsx(QD,{style:{fill:ix.button.color.grey[200]}})})}),Mn.jsx(iH,{elementIds:s?a:[t],isOpen:p,onClose:()=>{m(!1)}})]})]})},sH=window.React.useCallback,lH=window.React.useMemo;let cH=!1;const uH=e=>{var t;const{children:n,className:i,selectable:o=!0,element:r,isSidebar:a=!1,style:s,onClick:l,isPattern:c=!1,...u}=e,d=h_(),h=new URLSearchParams(d.search),p=eM((e=>{var t;return null==(t=e.chosenElement)?void 0:t.id})),m=eM((e=>e.chooseElement)),f=eM((e=>e.unchooseElement)),g=eM((e=>e.deMultiSelect)),y=sH((e=>t=>{t.stopPropagation(),m(e)}),[m]),v=lH((()=>r.id===p),[r.id,p]),[b,w]=sw.useNotification(),x=lH((()=>{var e;return a?"":(null==(e=r.data)?void 0:e.custom_css_classes)??""}),[null==(t=r.data)?void 0:t.custom_css_classes]),C=eM((e=>e.multiSelectedList)),_=eM((e=>e.multiSelect)),S=eM((e=>e.setMultiSelectedList)),k=lH((()=>C.length>1&&C.map((e=>e.id)).includes(r.id)),[C,r.id]),E=sH((e=>{if(null==l||l(),e.shiftKey)return(()=>{var e,t,n,i;window.getSelection&&((null==(e=window.getSelection())?void 0:e.empty)?null==(t=window.getSelection())||t.empty():(null==(n=window.getSelection())?void 0:n.removeAllRanges)&&(null==(i=window.getSelection())||i.removeAllRanges()))})(),_(r),void f();"yes"!==window.yaymailData.show_multi_select_notice&&"test"!==h.get("mode")||cH||(cH?b.destroy():(b.info({message:__("New feature","yaymail"),description:Mn.jsx("span",{dangerouslySetInnerHTML:{__html:__("You can now select multiple elements by holding %s key while clicking on an element","yaymail").replace("%s","SHIFT")}}),duration:0}),async function(){try{const e=await window.jQuery.ajax({type:"POST",url:window.yaymailData.admin_ajax.url,data:{action:"yaymail_dismiss_multi_select_notice",nonce:window.yaymailData.admin_ajax.nonce}});if(!e.success)throw new Error("Call ajax failed");return e}catch(e){throw console.error(e),e}}(),window.yaymailData.show_multi_select_notice="no",cH=!0)),r.parentId?g():S([r]),o&&y(r)(e)}),[o,r]),$=lH((()=>!a&&(v||C.length>1&&C[0].id===r.id)),[C,v,a]);KD((()=>{f(),g()}),(v||C.length>0)&&!a,{boundaryElementSelectors:[".yaymail-customizer-template-section","[class^=yaymail-email-customizer__header]",".yaymail-customizer-main"]});const M=lH((()=>{if(C.length<=1||v||a)return{};const e={},t=C.findIndex((e=>e.id===r.id));return 0===t&&(e.marginTop="20px",e.borderTop="2px solid #000000"),-1!==t&&(e.borderRight="2px solid #000000",e.borderLeft="2px solid #000000"),t===C.length-1&&(e.marginBottom="20px",e.borderBottom="2px solid #000000"),e}),[C,v,a,r.id]),R=window.yaymailData.yaymailHooks.applyFilters("yaymail-element-wrapper-styles",M,e,v,k),A=lH((()=>_$("yaymail-customizer-element","yaymail-element",v&&"yaymail-chosen-element",k&&"yaymail-multi-selected",i,x)),[v,k,i,x]),O=window.yaymailData.yaymailHooks.applyFilters("yaymail-element-wrapper-class",A,e,v,k),j=lH((()=>{var e;return v?{display:!0,reference:"element"}:{display:(null==(e=C[0])?void 0:e.id)===r.id,reference:"group"}}),[v,C,r.id]),T=lH((()=>"border"in r.data&&"button"!==r.type?{...s,...KE(r.data.border)}:s),[s,r.data]);return Mn.jsxs("div",{"data-yaymail-element-id":r.id,"data-yaymail-element-type":r.type,"data-yaymail-element-is-pattern":c,className:O,onClick:E,style:R,...u,children:[w,j.display&&Mn.jsx(YD,{reference:j.reference}),a?Mn.jsx("div",{className:"yaymail-chosen-element__handle-drag",children:n}):Mn.jsx("table",{className:_$("yaymail-element__content"),style:T,cellPadding:0,cellSpacing:0,children:Mn.jsx("tbody",{children:Mn.jsx("tr",{children:Mn.jsx("td",{children:n})})})}),$&&Mn.jsx(aH,{element:r})]})},dH=window.React.useMemo,hH=e=>{const{onChange:t,className:n,style:i,label:o,...r}=e,a=dH((()=>i$()),[]);return Mn.jsxs(bn,{direction:"vertical",className:_$("yaymail-number-input",n),style:i,children:[o&&Mn.jsx("label",{htmlFor:a,className:"yaymail-number-input-label",children:o}),Mn.jsx(Jp,{id:a,onChange:e=>{qE(e)&&(null==t||t(e))},...r})]})},pH=window.React.useCallback,mH=e=>{var t;const{title:n,children:i,options:o,defaultValue:r,onChange:a,value:s,onPopupScroll:l,onPopupScrollBottom:c,style:u,className:d,...h}=e||{},p=pH((e=>{if(l&&l(e),!c)return;const t=e.target;t.scrollTop+t.offsetHeight===t.scrollHeight&&c()}),[c,l]);return Mn.jsxs("div",{className:_$("yaymail-editor-property","yaymail-editor-selector",d),children:[""!==n&&Mn.jsx("div",{className:"yaymail-title",children:__(n??"Select")}),Mn.jsx(Qt,{style:{width:"100%",...u},options:fE(i)?void 0:o,value:s||r||(null==(t=null==o?void 0:o[0])?void 0:t.value),onChange:a,onPopupScroll:p,...h,children:i})]})},fH=e=>{var t;return Mn.jsx("div",{className:"yaymail-layout-grid-column",children:null==(t=null==e?void 0:e.itemList)?void 0:t.map(((e,t)=>{const n=e.Component,i=e.props;return Mn.jsx("div",{className:"yaymail-layout-grid-column__item",children:Mn.jsx(n,{...i})},t)}))})},gH=window.React.useCallback,yH=e=>{const t=e.value_path||"align",n=eM((e=>{var n;return YE(null==(n=e.chosenElement)?void 0:n.data,t)})),i=eM((e=>e.updateChosenElementData));if(!qE(n))return null;const o=gH((n=>{i((e=>{ZE(e,t,n.target.value)}),{attribute:(null==e?void 0:e.title)??"Align"})}),[i,n,t]),{title:r}=e||{};return Mn.jsxs("div",{className:"yaymail-editor-property yaymail-editor-property-align",children:[Mn.jsx("div",{className:"yaymail-title",children:__(r??"Align")}),Mn.jsx("div",{className:"yaymail-controls-container",children:Mn.jsxs(wn.Group,{defaultValue:"left",size:"large",className:"yaymail-align-radio-group",value:n,onChange:o,children:[Mn.jsx(wn.Button,{value:"left",className:"yaymail-align-radio-group-option",children:Mn.jsx(dL,{})}),Mn.jsx(wn.Button,{value:"center",className:"yaymail-align-radio-group-option",children:Mn.jsx(sL,{})}),Mn.jsx(wn.Button,{value:"right",className:"yaymail-align-radio-group-option",children:Mn.jsx(fL,{})})]})})]})},vH=window.React.memo,bH=(e,t)=>vH(e,t??gE),wH=bH((e=>Mn.jsxs("div",{className:_$("yaymail-editor-property",e.className),children:[Mn.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[Mn.jsx("div",{className:"yaymail-title",children:__(e.title)}),Mn.jsxs("div",{className:"yaymail-current-value",children:[e.value,e.displayUnit]})]}),Mn.jsx(hf,{railStyle:{background:"#383B3D"},trackStyle:{background:ix.color.wcPurple.default},handleStyle:{border:"none"},style:{margin:"0 7px 0 0"},min:e.min,max:e.max,value:e.value,onChange:e.onChange,tooltip:{placement:"topRight"}})]}))),xH=window.React.useCallback,CH=window.React.useMemo,_H=bH((e=>{const t=CH((()=>(null==e?void 0:e.mediaType)??"image"),[null==e?void 0:e.mediaType]),{value:n,mediaUrlUpdateCallback:i}=e||{};if(!i)return null;const{mediaUploader:o}=WE("yaymail-logo-element-uploader",i,!1,t),r=xH((()=>{o&&o.open()}),[o]),a=xH((e=>{fE(e.target.value)&&i(e.target.value)}),[i]),s=CH((()=>(null==e?void 0:e.title)??__("Image URL","yaymail")),[null==e?void 0:e.title]),l=CH((()=>(null==e?void 0:e.buttonTitle)??"Change image"),[null==e?void 0:e.buttonTitle]),c=CH((()=>(null==e?void 0:e.hidePreviewOnEmptyUrl)?Boolean(n&&((null==e?void 0:e.showPreview)??!0)):(null==e?void 0:e.showPreview)??!0),[null==e?void 0:e.showPreview,n,null==e?void 0:e.hidePreviewOnEmptyUrl]),u=CH((()=>null==e?void 0:e.showDeleteButton),[null==e?void 0:e.showDeleteButton]),d=CH((()=>!n),[n]),h=xH(((e,t)=>{e.stopPropagation(),t||i("")}),[i]);return Mn.jsxs("div",{className:_$("yaymail-editor-property","yaymail-editor-property-image",null==e?void 0:e.className),children:[Mn.jsx("div",{className:"yaymail-title",children:__(s)}),Mn.jsxs(bn,{direction:"vertical",size:12,style:{width:"100%"},children:[Mn.jsx(bb,{className:"yaymail-custom-input",placeholder:null==e?void 0:e.urlInputPlaceHolder,value:n,onChange:a}),Mn.jsxs(Ct,{className:"yaymail-change-image-btn",onClick:r,children:[__(l),u&&Mn.jsx(yI,{className:_$("yaymail-btn-delete",d&&"yaymail-disabled"),onClick:e=>h(e,d),disabled:d})]}),c&&Mn.jsx(Rv,{className:"yaymail-preview-image",fallback:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==",src:n??"",preview:!1,width:"100%"})]})]})})),SH=window.React.useCallback,kH=window.React.useMemo,{Option:EH}=Qt,$H=e=>Mn.jsx(Mn.Fragment,{children:e.map((e=>Mn.jsx(EH,{value:e,label:e,children:Mn.jsx("span",{style:{textTransform:"capitalize"},children:yE(e)})},e)))}),MH=["default","center_center","center_left","center_right","top_center","top_left","top_right","bottom_center","bottom_left","bottom_right","custom"],RH=["default","auto","cover","contain","custom"],AH=$H(MH),OH=$H(["default","no-repeat","repeat","repeat-x","repeat-y"]),jH=$H(RH),TH=e=>{const{value_path:t,title:n,media_type:i,button_title:o,show_preview:r,hide_preview_on_empty_url:a,url_input_place_holder:s,show_delete_button:l}=e??{},c=t??"background_image",u=eM((e=>{var t;return YE(null==(t=e.chosenElement)?void 0:t.data,c)})),d=eM((e=>e.updateChosenElementData)),h=kH((()=>null==u?void 0:u.url),[null==u?void 0:u.url]),p=SH((e=>{d((t=>{ZE(t,`${c}.url`,e)}),{attribute:__("Background Image URL","yaymail")})}),[d]),m=kH((()=>null==u?void 0:u.position),[null==u?void 0:u.position]),f=SH((e=>{d((t=>{ZE(t,`${c}.position`,e)}),{attribute:__("Background Image Position","yaymail")})}),[d]),g=kH((()=>"custom"===m),[m]),y=kH((()=>(null==u?void 0:u.x_position)??0),[null==u?void 0:u.x_position]),v=SH((e=>{d((t=>{ZE(t,`${c}.x_position`,e)}),{attribute:__("Background Image Position X","yaymail")})}),[d]),b=kH((()=>(null==u?void 0:u.y_position)??0),[null==u?void 0:u.y_position]),w=SH((e=>{d((t=>{ZE(t,`${c}.y_position`,e)}),{attribute:__("Background Image Position Y","yaymail")})}),[d]),x=kH((()=>null==u?void 0:u.repeat),[null==u?void 0:u.repeat]),C=SH((e=>{d((t=>{ZE(t,`${c}.repeat`,e)}),{attribute:__("Background Image Size","yaymail")})}),[d]),_=kH((()=>null==u?void 0:u.size),[null==u?void 0:u.size]),S=SH((e=>{d((t=>{ZE(t,`${c}.size`,e)}),{attribute:__("Background Image Position Repeat","yaymail")})}),[d]),k=kH((()=>"custom"===_),[_]),E=kH((()=>(null==u?void 0:u.custom_size)??100),[null==u?void 0:u.custom_size]),$=SH((e=>{d((t=>{ZE(t,`${c}.custom_size`,e)}),{attribute:__("Background Image Custom Size","yaymail")})}),[d]);return Mn.jsxs(Mn.Fragment,{children:[Mn.jsx(_H,{value:h??"",mediaUrlUpdateCallback:p,mediaType:i,buttonTitle:o,showPreview:r,hidePreviewOnEmptyUrl:a,urlInputPlaceHolder:s,showDeleteButton:l}),Boolean(h)&&Mn.jsxs(Mn.Fragment,{children:[Mn.jsx(mH,{title:__("Background position","yaymail"),value:m,onChange:f,defaultValue:MH[0],children:AH}),g&&Mn.jsxs(Mn.Fragment,{children:[Mn.jsx(wH,{className:"yaymail-background-custom-position",title:__("X Position","yaymail"),value:y,displayUnit:"%",min:-100,max:100,onChange:v}),Mn.jsx(wH,{className:"yaymail-background-custom-position",title:__("Y Position","yaymail"),value:b,displayUnit:"%",min:-100,max:100,onChange:w})]}),Mn.jsx(mH,{title:__("Background repeat","yaymail"),value:x,onChange:C,defaultValue:MH[0],children:OH}),Mn.jsx(mH,{title:__("Background size","yaymail"),value:_,onChange:S,defaultValue:RH[0],children:jH}),k&&Mn.jsx(wH,{className:"yaymail-background-custom-slider",title:__("Width","yaymail"),value:E,displayUnit:"%",min:0,max:100,onChange:$})]})]})},NH=e=>lO.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("rect",{x:.5,y:.5,width:13,height:13,rx:.5,stroke:"white"}),lO.createElement("rect",{x:2.5,y:2.5,width:9,height:9,rx:.5,stroke:"white"})),LH=e=>lO.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("mask",{id:"path-1-inside-1_2107_1487",fill:"white"},lO.createElement("path",{d:"M1 1C1 0.447715 1.44772 0 2 0H12C12.5523 0 13 0.447715 13 1V9H1V1Z"})),lO.createElement("path",{d:"M14 8V9H12V8H14ZM2 8V9H0V8H2ZM2 4V6H0V4H2ZM14 4V6H12V4H14ZM2 2H0V1C0 -0.10457 0.895431 -1 2 -1H2.83301V1H2V2ZM14 2H12V1H11.167V-1H12C13.1046 -1 14 -0.104569 14 1V2ZM6.16699 -1V1H4.5V-1H6.16699ZM9.5 -1V1H7.83301V-1H9.5Z",fill:"#939393",mask:"url(#path-1-inside-1_2107_1487)"}),lO.createElement("rect",{x:.5,y:9.5,width:13,height:4,rx:.5,stroke:"white"})),IH=e=>lO.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("line",{x1:2.6543,x2:2.6543,y2:8,stroke:"white"}),lO.createElement("line",{x1:2.6543,y1:11,x2:2.6543,y2:14,stroke:"white"}),lO.createElement("line",{x1:11.2695,y1:6,x2:11.2695,y2:14,stroke:"white"}),lO.createElement("circle",{cx:2.59437,cy:9.49965,r:2.09437,stroke:"white"}),lO.createElement("circle",{cx:11.4049,cy:4.49965,r:2.09437,stroke:"white"}),lO.createElement("line",{x1:11.2695,y1:-2.02946e-8,x2:11.2695,y2:3,stroke:"white"})),DH=e=>lO.createElement("svg",{width:14,height:15,viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("mask",{id:"path-1-inside-1_2107_1493",fill:"white"},lO.createElement("path",{d:"M12.959 0.99266C13.5113 0.994017 13.9579 1.44283 13.9565 1.99511L13.932 11.9951C13.9306 12.5474 13.4818 12.994 12.9295 12.9926L4.92953 12.973L4.95901 0.973006L12.959 0.99266Z"})),lO.createElement("path",{d:"M5.92707 13.9754L4.92707 13.973L4.93199 11.973L5.93198 11.9754L5.92707 13.9754ZM5.95655 1.97546L4.95655 1.973L4.96147 -0.0269907L5.96147 -0.0245339L5.95655 1.97546ZM9.95654 1.98529L7.95655 1.98037L7.96146 -0.0196204L9.96145 -0.0147068L9.95654 1.98529ZM9.92706 13.9853L7.92706 13.9803L7.93198 11.9803L9.93197 11.9853L9.92706 13.9853ZM11.9565 1.9902L11.9614 -0.00979331L12.9614 -0.00733654C14.066 -0.00462287 14.9592 0.893005 14.9565 1.99757L14.9545 2.83058L12.9545 2.82566L12.9565 1.99266L11.9565 1.9902ZM11.9271 13.9902L11.932 11.9902L12.932 11.9926L12.934 11.1596L14.934 11.1645L14.932 11.9975C14.9292 13.1021 14.0316 13.9953 12.927 13.9926L11.9271 13.9902ZM14.9463 6.16455L12.9463 6.15964L12.9504 4.49265L14.9504 4.49756L14.9463 6.16455ZM14.9381 9.49755L12.9381 9.49263L12.9422 7.82565L14.9422 7.83056L14.9381 9.49755Z",fill:"#939393",mask:"url(#path-1-inside-1_2107_1493)"}),lO.createElement("rect",{x:4.53516,y:.512695,width:13,height:4,rx:.5,transform:"rotate(90 4.53516 0.512695)",stroke:"white"})),HH=e=>lO.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("circle",{cx:7,cy:7,r:6.5,stroke:"white"}),lO.createElement("line",{x1:11.3716,y1:2.33448,x2:2.37165,y2:12.3345,stroke:"white"})),PH=e=>lO.createElement("svg",{width:15,height:15,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("mask",{id:"path-1-inside-1_2107_1496",fill:"white"},lO.createElement("path",{d:"M9.03125 1.01855L9.00177 13.0185L1.00179 12.9989C0.44951 12.9975 0.00289608 12.5487 0.00425291 11.9964L0.0288206 1.99644C0.0301774 1.44416 0.478991 0.997544 1.03127 0.998901L9.03125 1.01855Z"})),lO.createElement("path",{d:"M1.02677 2.8319L-0.973223 2.82699L-0.971176 1.99398C-0.968463 0.889418 -0.070835 -0.00381009 1.03373 -0.00109642L2.03373 0.00136035L2.02881 2.00135L1.02882 1.9989L1.02677 2.8319ZM1.00425 11.9989L2.00425 12.0013L1.99933 14.0013L0.999336 13.9989C-0.10523 13.9961 -0.998458 13.0985 -0.995744 11.994L-0.993698 11.1609L1.0063 11.1659L1.00425 11.9989ZM1.01858 6.16588L-0.981414 6.16096L-0.977318 4.49398L1.02268 4.49889L1.01858 6.16588ZM1.01039 9.49887L-0.989602 9.49396L-0.985507 7.82697L1.01449 7.83189L1.01039 9.49887ZM6.0288 2.01118L4.02881 2.00627L4.03372 0.00627389L6.03372 0.0111874L6.0288 2.01118ZM5.99932 14.0111L3.99933 14.0062L4.00424 12.0062L6.00423 12.0112L5.99932 14.0111ZM9.02879 2.01855L8.0288 2.01609L8.03371 0.016101L9.03371 0.0185577L9.02879 2.01855ZM8.99931 14.0185L7.99932 14.0161L8.00423 12.0161L9.00423 12.0185L8.99931 14.0185Z",fill:"#939393",mask:"url(#path-1-inside-1_2107_1496)"}),lO.createElement("rect",{x:13.6055,y:.53418,width:13,height:4,rx:.5,transform:"rotate(90 13.6055 0.53418)",stroke:"white"})),zH=e=>lO.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("mask",{id:"path-1-inside-1_2107_1490",fill:"white"},lO.createElement("path",{d:"M1 5H13V13C13 13.5523 12.5523 14 12 14H2C1.44772 14 1 13.5523 1 13V5Z"})),lO.createElement("path",{d:"M2.83301 13V15H2C0.89543 15 0 14.1046 0 13V12H2V13H2.83301ZM12 13V12H14V13C14 14.1046 13.1046 15 12 15H11.167V13H12ZM6.16699 13V15H4.5V13H6.16699ZM9.5 13V15H7.83301V13H9.5ZM2 8V10H0V8H2ZM14 8V10H12V8H14ZM2 5V6H0V5H2ZM14 5V6H12V5H14Z",fill:"#939393",mask:"url(#path-1-inside-1_2107_1490)"}),lO.createElement("rect",{x:.5,y:.5,width:13,height:4,rx:.5,stroke:"white"})),FH=window.React.useMemo,VH=e=>{const{defaultValue:t,buttonLabel:n,value:i,title:o,onChange:r,...a}=e,s=FH((()=>{let e=i??t??ix.color.wcPurple.default;return"string"==typeof e?e:(null==e?void 0:e.default_value)??""}),[i,t]);return Mn.jsxs("div",{className:"yaymail-editor-property yaymail-custom-color-picker",children:[o&&Mn.jsx("div",{className:"yaymail-title",children:o}),Mn.jsx(eg,{defaultValue:s,value:s,onChange:r,...a,children:Mn.jsxs("span",{className:_$("yaymail-custom-color-picker-button",{disabled:a.disabled}),children:[Mn.jsx("span",{className:"yaymail-custom-color-picker__sample",style:{backgroundColor:s}}),Mn.jsx("span",{className:"yaymail-custom-color-picker__label",children:n??"Select Color"})]})})]})},BH=window.React.useCallback,WH=window.React.useMemo,UH=e=>{const t=WH((()=>(null==e?void 0:e.value_path)??"background_color"),[null==e?void 0:e.value_path]),n=eM((e=>{var n;return YE(null==(n=e.chosenElement)?void 0:n.data,t)})),i=eM((e=>e.updateChosenElementData)),o=BH(P$(((n,o)=>{o.includes("rgb")&&(o=n.toHexString()),i((e=>{ZE(e,t,o)}),{attribute:(null==e?void 0:e.title)??"Color"})}),0),[i,n,t]),r=WH((()=>n??"#F0F0F1"),[n]),{...a}=e||{};return Mn.jsx("div",{className:"yaymail-editor-property yaymail-editor-property-color",children:Mn.jsx(VH,{value:r,onChange:o,...a})})},YH=window.React.useCallback,ZH=e=>{const{value_path:t,default_value:n,title:i,options:o,...r}=e||{};if(!t)return null;const a=eM((e=>{var n;return YE(null==(n=e.chosenElement)?void 0:n.data,t??"")})),s=eM((e=>e.updateChosenElementData)),l=YH((n=>{(null==e?void 0:e.onChange)?e.onChange(n):s((e=>{ZE(e,t,n)}),{attribute:null==e?void 0:e.title})}),[s,t]);return Mn.jsx(mH,{onChange:l,value:a,options:o??[],defaultValue:n,title:i??__("Select","yaymail"),...r})},GH=window.React.useCallback,qH=window.React.useMemo,KH=[{value:"solid",label:Mn.jsxs("div",{className:"yaymail-border-style-label",children:[Mn.jsx(iD,{className:"yaymail-border-style-icon"}),Mn.jsx("span",{children:__("Solid","yaymail")})]})},{value:"dashed",label:Mn.jsxs("div",{className:"yaymail-border-style-label",children:[Mn.jsx(pI,{className:"yaymail-border-style-icon"}),Mn.jsx("span",{children:__("Dashed","yaymail")})]})},{value:"dotted",label:Mn.jsxs("div",{className:"yaymail-border-style-label",children:[Mn.jsx(fD,{className:"yaymail-border-style-icon"}),Mn.jsx("span",{children:__("Dotted","yaymail")})]})}],QH=[{value:"all",label:__("All","yaymail"),icon:Mn.jsx(NH,{})},{value:"top",label:__("Top","yaymail"),icon:Mn.jsx(zH,{})},{value:"bottom",label:__("Bottom","yaymail"),icon:Mn.jsx(LH,{})},{value:"left",label:__("Left","yaymail"),icon:Mn.jsx(DH,{})},{value:"right",label:__("Right","yaymail"),icon:Mn.jsx(PH,{})},{value:"custom",label:__("Custom","yaymail"),icon:Mn.jsx(IH,{})},{value:"none",label:__("None","yaymail"),icon:Mn.jsx(HH,{})}],XH=({currentSide:e,onSideChange:t})=>Mn.jsx("div",{className:"yaymail-border-side-selector",children:QH.map(((n,i)=>Mn.jsxs("div",{children:[Mn.jsxs("button",{className:"yaymail-border-side-option "+(e===n.value?"yaymail-border-side-option--active":""),onClick:()=>t(n.value),children:[Mn.jsx("span",{className:"yaymail-border-side-check "+(e===n.value?"yaymail-border-side-check--active":""),children:Mn.jsx(PL,{})}),Mn.jsx("span",{className:"yaymail-border-side-icon",children:n.icon}),Mn.jsx("span",{className:"yaymail-border-side-label",children:n.label})]}),4===i&&Mn.jsx("div",{className:"yaymail-border-side-divider"})]},n.value)))}),JH=({title:e,value:t,disabled:n,addonBefore:i,style:o,onChange:r})=>{const a=qH((()=>i$()),[]);return Mn.jsx("div",{className:"yaymail-editor-property yaymail-editor-number-input",children:Mn.jsx("div",{className:"yaymail-controls-container",children:Mn.jsxs(bn,{direction:"vertical",className:"yaymail-number-input",children:[e&&Mn.jsx("label",{htmlFor:a,className:"yaymail-number-input-label",children:e}),Mn.jsx(Jp,{id:a,value:t,onChange:r,min:0,max:50,disabled:n,addonBefore:i,style:o})]})})})},eP=e=>{const{title:t,value_path:n,default_value:i}=e||{},o=n??"border",r=eM((e=>{var t;return YE(null==(t=e.chosenElement)?void 0:t.data,o)})),a=qH((()=>void 0===r?i:r),[r]),s=eM((e=>e.updateChosenElementData)),l=qH((()=>t??__("Border","yaymail")),[t]),c=GH(((e,t)=>{s((n=>{const r=YE(n,o)||i,a=JSON.parse(JSON.stringify(r));a[e]=t,ZE(n,o,a)}),{attribute:l+" "+e})}),[s,o,l]),u=GH((e=>{c("side",e)}),[c]),d=qH((()=>{var e;return null==(e=QH.find((e=>e.value===a.side)))?void 0:e.icon}),[a]);return Mn.jsxs("div",{className:"yaymail-editor-property yaymail-editor-property-border",children:[Mn.jsx("div",{className:"yaymail-border-header",children:Mn.jsx("div",{className:"yaymail-title",children:__(l)})}),Mn.jsx("div",{className:"yaymail-border-color-wrapper",children:Mn.jsx(UH,{value_path:"border.color",disabled:"none"===a.side})}),Mn.jsxs("div",{className:"yaymail-border-weight-style-wrapper",children:[Mn.jsx(JH,{disabled:"none"===a.side||"custom"===a.side,title:__("Weight","yaymail"),value:a.width,onChange:e=>c("width",e),style:{width:"67.5px"}}),Mn.jsx(ZH,{disabled:"none"===a.side,title:__("Style","yaymail"),value_path:"border.style",options:KH,defaultValue:a.style,onChange:e=>c("style",e)}),Mn.jsx("div",{children:Mn.jsx(Ea,{content:Mn.jsx(XH,{currentSide:a.side,onSideChange:u}),trigger:"click",arrow:!1,placement:"right",getPopupContainer:()=>document.getElementById("yaymail-main-pages"),children:Mn.jsx(Ct,{className:"yaymail-border-side-button",icon:d})})})]}),"custom"===a.side&&Mn.jsxs("div",{className:"yaymail-border-custom-wrapper",children:[Mn.jsx(JH,{addonBefore:Mn.jsx(DH,{}),value:a.custom.left,onChange:e=>c("custom",{...a.custom,left:e})}),Mn.jsx(JH,{addonBefore:Mn.jsx(zH,{}),value:a.custom.top,onChange:e=>c("custom",{...a.custom,top:e})}),Mn.jsx(JH,{addonBefore:Mn.jsx(PH,{}),value:a.custom.right,onChange:e=>c("custom",{...a.custom,right:e})}),Mn.jsx(JH,{addonBefore:Mn.jsx(LH,{}),value:a.custom.bottom,onChange:e=>c("custom",{...a.custom,bottom:e})})]})]})},tP=window.React.useCallback,nP=window.React.useMemo,iP=e=>{const{value_path:t,options:n,defaultValue:i,number_of_columns:o}=e||{},r=nP((()=>t??"showing_items"),[t]),a=eM((e=>{var t;return YE(null==(t=e.chosenElement)?void 0:t.data,r)})),s=eM((e=>e.updateChosenElementData));if(!qE(a))return null;const{title:l}=e||{},c=nP((()=>Math.floor(24/(o||1))),[o]),u=tP(((e,t)=>"string"==typeof e||"number"==typeof e?e:e[t]),[]);return Mn.jsxs("div",{className:"yaymail-editor-property yaymail-editor-property-checkbox-group",children:[Mn.jsx("div",{className:"yaymail-title",children:__(l??"Items")}),Mn.jsx("div",{className:"yaymail-controls-container",children:Mn.jsx(xn.Group,{defaultValue:i,onChange:(null==e?void 0:e.onChange)??(t=>{const n=t.map((e=>"string"==typeof e?e:e.toString()));s((e=>{ZE(e,r,n)}),{attribute:(null==e?void 0:e.title)??__("Items","yaymail")})}),value:a,children:Mn.jsx(gt,{children:null==n?void 0:n.map(((e,t)=>Mn.jsx(yt,{span:c,children:Mn.jsx(xn,{value:u(e,"value"),style:{color:ix.color.white},children:u(e,"label")})},t)))})})})]})},oP=window.React.useCallback,rP=window.React.useMemo,aP=ix.customizer.percentColumnMinWidth,sP=e=>{const{title:t,amount:n}=e||{};if(1===n)return null;const i=eM((e=>{var t,n;return null==(n=null==(t=e.chosenElement)?void 0:t.children)?void 0:n.map((e=>e.data.width))}))??[],o=eM((e=>e.updateChosenElementChildren)),r=oP((e=>`${__("Column","yaymail")} ${e+1}`),[]),a=oP(((e,t)=>{o((n=>{if(!n)return;const i=((e,t)=>{const n=e.length;return n<=1?[]:0===t?[t+1]:t===n-1?[t-1]:[t-1,t+1]})(n,t),o=n.reduce(((e,n,o)=>[...i,t].includes(o)?e+(n.data.width??0):e),0);if(0===i.length)return;const r=o-i.length*aP;if(r({index:e,width:n[e].data.width-s})));2===l.length&&l.forEach((e=>{if(e.widtht.index!==e.index));n&&(n.width-=t)}})),l.every((e=>e.width{n[e.index].data.width=e.width})),n[t].data.width=a)}),{attribute:__("Width","yaymail")})}),[o]),s=rP((()=>100-(((null==e?void 0:e.amount)||1)-1)*aP),[null==e?void 0:e.amount]);return Mn.jsxs("div",{className:"yaymail-editor-property yaymail-editor-property-column-width",children:[Mn.jsx("div",{className:"yaymail-title",children:t}),Mn.jsx(bn,{className:"yaymail-controls-container",children:i.map(((e,t)=>Mn.jsx(hH,{label:r(t),value:e,onChange:e=>a(e,t),max:s},t)))})]})},lP=(e,t)=>{if(null!=t)return t.split(".").reduce(((e,t)=>null==e?void 0:e[t]),e)},cP=(e,t,n)=>{if(null==t)return;const i=t.split(".");i.reduce(((e,t,o)=>o===i.length-1?(e[t]=n,e):(void 0!==e[t]&&null!==e[t]||(e[t]={}),e[t])),e)},uP=window.React.useCallback,dP=window.React.useState,{Option:hP}=Qt,pP=({store:e})=>{const t=e((e=>e.selectedColumn)),[n,i]=dP(!1),o=uP((()=>{i(!1)}),[]),r=uP((()=>{i(!0)}),[]);return Mn.jsx("div",{className:"yaymail-editor-property yaymail-editor-property-copy-column",children:Mn.jsx("div",{className:"yaymail-controls-container",children:Mn.jsxs("div",{className:"yaymail-title",style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[Mn.jsxs("span",{children:[__("Selecting column:","yaymail")," ",`${t}`]}),Mn.jsx(Ct,{type:"primary",onClick:r,children:__("Copy content","yaymail")}),Mn.jsx(mP,{currentColumn:t,isModalOpen:n,onClose:o})]})})})},mP=e=>{const t=eM((e=>e.updateChosenElementData)),n=eM((e=>e.chosenElement)),i=e=>{const t=null==n?void 0:n.type;return"image_list"===t?lP(null==n?void 0:n.data,`image_list.column_${e}`):"text_list"===t?lP(null==n?void 0:n.data,`text_list.column_${e}`):void 0},o=i(1),r=i(2),a=i(3),[s,l]=dP("copy_to"),[c,u]=dP("1"!=e.currentColumn?"1":"2");return Mn.jsx(Gb,{title:__("You are selecting column","yaymail")+` ${e.currentColumn}`,open:e.isModalOpen,onCancel:e.onClose,footer:null,centered:!0,destroyOnClose:!0,wrapClassName:"yaymail-copy-column-modal",children:Mn.jsx("table",{children:Mn.jsx("tbody",{children:Mn.jsxs("tr",{children:[Mn.jsx("td",{children:Mn.jsx(Ct,{type:"primary",onClick:()=>{const i="1"==e.currentColumn?o:"2"==e.currentColumn?r:a,l="1"==c?o:"2"==c?r:a;t("copy_to"==s?e=>{"image_list"===(null==n?void 0:n.type)?cP(e,"image_list.column_"+c,i):"text_list"===(null==n?void 0:n.type)&&cP(e,"text_list.column_"+c,i)}:t=>{"image_list"===(null==n?void 0:n.type)?cP(t,"image_list.column_"+e.currentColumn,l):"text_list"===(null==n?void 0:n.type)&&cP(t,"text_list.column_"+e.currentColumn,l)},{attribute:__("Copy column","yaymail")})},children:__("Copy content","yaymail")})}),Mn.jsx("td",{children:Mn.jsxs(Qt,{style:{width:"120px"},className:"yaymail-global__select",defaultValue:s,onChange:e=>{l(e)},popupMatchSelectWidth:!1,children:[Mn.jsx(hP,{value:"copy_to",children:Mn.jsx("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:__("To","yaymail")})}),Mn.jsx(hP,{value:"copy_from",children:Mn.jsx("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:__("From","yaymail")})})]})}),Mn.jsx("td",{children:Mn.jsxs(Qt,{style:{width:"170px"},className:"yaymail-global__select",defaultValue:c,onChange:e=>{u(e)},popupMatchSelectWidth:!1,children:[Mn.jsx(hP,{value:"1",children:Mn.jsx("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:__("Column 1","yaymail")})}),Mn.jsx(hP,{value:"2",children:Mn.jsx("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:__("Column 2","yaymail")})}),Mn.jsx(hP,{value:"3",children:Mn.jsx("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:__("Column 3","yaymail")})})]})})]})})})})},fP=window.React.useCallback,{RangePicker:gP}=Jg,yP=e=>{const{value_path:t,title:n,onChange:i,style:o,calendar_type:r}=e??{};if(!t)return null;const a=eM((e=>{var n;return YE(null==(n=e.chosenElement)?void 0:n.data,t)})),s=eM((e=>e.updateChosenElementData)),l=fP((e=>{s((n=>{let i=e;"range"===r&&null!=i&&i.length>1&&(i=[ys(e[0]).format("YYYY-MM-DD"),ys(e[1]).format("YYYY-MM-DD")]),ZE(n,t,i)}),{attribute:n})}),[s,n,r]);return Mn.jsxs("div",{className:"yaymail-editor-property yaymail-editor-number-input",children:[Mn.jsx("div",{className:"yaymail-title",children:n??__("Choose date","yaymail")}),Mn.jsx("div",{className:"yaymail-controls-container",children:"range"===r?Mn.jsx(gP,{format:"YYYY-MM-DD",style:o??{width:"100%"},defaultValue:a?[ys(a[0],"YYYY-MM-DD"),ys(a[1],"YYYY-MM-DD")]:void 0,onChange:l??i}):Mn.jsx(Jg,{format:"YYYY-MM-DD",style:o??{width:"100%"},defaultValue:a?ys(a,"YYYY-MM-DD"):void 0,onChange:l??i})})]})},vP=window.React.useCallback,bP=window.React.useMemo,wP=e=>{const t=cE((e=>{var t;return null==(t=e.settings)?void 0:t.container_width})),{value_path:n,unit:i}=e||{},o=n||"width",r=bP((()=>(null==e?void 0:e.min)??0),[null==e?void 0:e.min]),a=bP((()=>(null==e?void 0:e.max)??t??605),[null==e?void 0:e.max]),s=bP((()=>(null==e?void 0:e.default_value)??(null==e?void 0:e.max)??172),[null==e?void 0:e.default_value,null==e?void 0:e.max]),l=eM((e=>{var t;return YE(null==(t=e.chosenElement)?void 0:t.data,o)})),c=eM((e=>e.updateChosenElementData)),u=bP((()=>function(e){if(!qE(e))return 0;if("number"==typeof e)return e;const t=parseFloat(e);return isNaN(t)?0:t}(l??s)),[l,s]),d=bP((()=>(null==e?void 0:e.title)??__("Dimension","yaymail")),[]),h=vP(P$((e=>{"number"==typeof e&&c((t=>{ZE(t,o,e)}),{attribute:d})}),0),[c,o]),p=bP((()=>i??"px"),[i]);return Mn.jsx(wH,{className:"yaymail-editor-property-width",title:d,value:u,displayUnit:p,min:r,max:a,onChange:h})},xP=e=>Mn.jsxs("div",{className:"yaymail-editor-property yaymail-editor-property-group-definition",children:[e.title&&Mn.jsx("div",{dangerouslySetInnerHTML:{__html:e.title},className:"yaymail-editor-property-group-definition__title"}),e.description&&Mn.jsx("div",{dangerouslySetInnerHTML:{__html:e.description},className:"yaymail-editor-property-group-definition__description"})]}),CP=window.React.useCallback,_P=window.React.useMemo,SP=e=>{const{value_path:t,default_value:n,title:i,onChange:o,value:r,validation_message:a}=e||{},s=_P((()=>t??"text"),[t]),l=eM((e=>{var t;return YE(null==(t=e.chosenElement)?void 0:t.data,s)})),c=eM((e=>e.updateChosenElementData)),u=CP((e=>{c((t=>{ZE(t,s,e.target.value)}),{attribute:i})}),[c,s,i]);return Mn.jsxs("div",{className:"yaymail-editor-property yaymail-editor-property-text",children:[Mn.jsx("div",{className:"yaymail-title",children:__(i??"Text")}),Mn.jsx(bb.TextArea,{className:"yaymail-custom-input",placeholder:null==e?void 0:e.placeholder,value:r??l??n,onChange:o??u,rows:null==e?void 0:e.rows,autoSize:!(null==e?void 0:e.multiple)&&{minRows:1,maxRows:10}}),Boolean(a)&&Mn.jsx("p",{className:"yaymail-custom-input-validation-message",children:a})]})},kP=window.React.useCallback,EP=window.React.useMemo,$P=window.React.useState,{Option:MP}=Qt,RP=["woocommerce_email_before_order_table","woocommerce_email_after_order_table","yaydp_on_sale_products"],AP=NP("your_hook"),OP=(jP=RP,Mn.jsxs(Mn.Fragment,{children:[jP.map((e=>Mn.jsx(MP,{value:NP(e),label:e,children:Mn.jsx("span",{children:e})},e))),Mn.jsx(MP,{value:AP,children:Mn.jsx("span",{children:__("Custom","yaymail")})},"custom")]}));var jP;const TP=e=>{const t=(null==e?void 0:e.value_path)??"hook_shortcode",n=(null==e?void 0:e.title)??__("Hook shortcode","yaymail"),i=eM((e=>{var n;return YE(null==(n=e.chosenElement)?void 0:n.data,t)})),o=eM((e=>e.updateChosenElementData)),r=kP((e=>{o((n=>{ZE(n,t,e)}),{attribute:n})}),[o,t]),a=EP((()=>RP.some((e=>null==i?void 0:i.includes(e)))?i:AP),[i]),[s,l]=$P(a===AP),c=kP((e=>{l(e===AP),r(e)}),[l,r]),[u,d]=$P(null),h=kP((e=>{e.target.value&&(/^\[yaymail_custom_hook(?=.*\bhook=".+").*]$/.test(e.target.value)?d(null):d("Valid shortcode should look like: "+AP),r(e.target.value))}),[r,d]);return Mn.jsxs(Mn.Fragment,{children:[Mn.jsx(mH,{title:n,value:a,onChange:c,children:OP}),s&&Mn.jsx(SP,{title:__("Custom Hook","yaymail"),value:i,onChange:h,validation_message:u})]})};function NP(e){return e?(e.startsWith('[yaymail_custom_hook hook="')||(e=`[yaymail_custom_hook hook="${e}"`),e.includes("yaydp_on_sale_products")&&(e+=' limit="6" ',e+=' sale_price_color="#ec4770" ',e+=' regular_price_color="#808080" ',e+=' product_name_color="#636363" ',e+=' button_background_color="#ec4770" ',e+=' button_text_color="#ffffff" '),e.endsWith("]")||(e+="]"),e):""}const LP=()=>Mn.jsx("div",{className:"yaymail-editor-property yaymail-editor-property-line-breaker",children:Mn.jsx(Yh,{style:{borderColor:"var(--yaymail-sidebar-color-grey-light)",margin:0}})}),IP=window.React.useCallback,DP=window.React.useEffect,HP=window.React.useMemo,PP=window.React.useState,zP=e=>{const{value_path:t,title:n,min:i,max:o,onChange:r,style:a,max_dependency:s,is_debounce:l,debounce_time:c}=e??{};if(!t)return null;const u=eM((e=>{var n;return YE(null==(n=e.chosenElement)?void 0:n.data,t)})),d=eM((e=>e.chosenElement)),h=eM((e=>e.updateChosenElementData)),p=IP(((e,t)=>YE(t,e)),[]),[m,f]=PP(u??0);DP((()=>{if(s&&(null==d?void 0:d.data)){const e=p(s,d.data);Number(u)>e&&h((n=>{ZE(n,t,e)}),{attribute:n})}}),[u,t,null==d?void 0:d.data,s,p,h,n]);const g=HP((()=>{if(s&&(null==d?void 0:d.data)){const e=p(s,d.data);if(void 0!==e)return e}return o??10}),[s,null==d?void 0:d.data,p,o]),y=IP((e=>{h((n=>{ZE(n,t,e)}),{attribute:n})}),[h,n]),v=IP(P$((e=>{y(e)}),c??300),[y,c]),b=IP((e=>{f(e),v(e)}),[v]);return Mn.jsxs("div",{className:"yaymail-editor-property yaymail-editor-number-input",children:[Mn.jsx("div",{className:"yaymail-title",children:__(n??"Number Input")}),Mn.jsx("div",{className:"yaymail-controls-container",children:Mn.jsx(hH,{style:a??{width:"100%"},value:l?m:u??0,onChange:l?b:y??r,min:i??0,max:g})})]})},FP=window.React.useCallback,VP=window.React.useMemo,BP=e=>{var t;const n=eM((e=>{var t;return null==(t=e.chosenElement)?void 0:t.id})),i=null==(t=void 0===(null==e?void 0:e.editor_id)?n:e.editor_id)?void 0:t.toString(),o=(null==e?void 0:e.value_path)??"rich_text",r=eM((e=>{var t;return YE(null==(t=e.chosenElement)?void 0:t.data,o)})),a=eM((e=>e.updateChosenElementData)),s=VP((()=>(null==e?void 0:e.title)??__("Content","yaymail")),[]),l=FP((t=>{a((e=>{ZE(e,o,t)}),{attribute:(null==e?void 0:e.title)??__("Content","yaymail")})}),[a,o]);return Mn.jsx(Z$,{id:i,value:r,onChange:l,title:s})},WP=window.React.useCallback,UP=e=>{const t=e.value_path||"number_column",n=eM((e=>{var n;return YE(null==(n=e.chosenElement)?void 0:n.data,t)})),i=eM((e=>e.updateChosenElementData)),o=WP((n=>{i((e=>{ZE(e,t,n.target.value)}),{attribute:e.title??__("Select number column","yaymail")})}),[i,t]),{title:r}=e||{};return Mn.jsxs("div",{className:"yaymail-editor-property yaymail-editor-property-select-number",children:[Mn.jsx("div",{className:"yaymail-title",children:__(r??"Select number column")}),Mn.jsx("div",{className:"yaymail-controls-container",children:Mn.jsxs(wn.Group,{defaultValue:"two",size:"large",className:"yaymail-select-number-radio-group",value:+n,onChange:o,children:[Mn.jsx(wn.Button,{value:1,className:"yaymail-select-number-radio-group-option",children:Mn.jsx("span",{children:"1"})}),Mn.jsx(wn.Button,{value:2,className:"yaymail-select-number-radio-group-option",children:Mn.jsx("span",{children:"2"})}),Mn.jsx(wn.Button,{value:3,className:"yaymail-select-number-radio-group-option",children:Mn.jsx("span",{children:"3"})})]})})]})},YP=window.React.useCallback,ZP=window.React.useMemo,GP=[{key:"top",label:"Top"},{key:"bottom",label:"Bottom"},{key:"left",label:"Left"},{key:"right",label:"Right"}],qP=e=>{const{title:t,value_path:n,min:i,max:o}=e||{},r=n??"padding",a=eM((e=>{var t;return YE(null==(t=e.chosenElement)?void 0:t.data,r)})),s=eM((e=>e.updateChosenElementData)),l=ZP((()=>t??__("Spacing","yaymail")),[t]),c=YP((e=>t=>{const n={...a};n[e]=t,s((e=>{ZE(e,r,n)}),{attribute:l})}),[s,a]);return Mn.jsxs("div",{className:"yaymail-editor-property yaymail-editor-property-padding",children:[Mn.jsx("div",{className:"yaymail-title",children:__(l)}),Mn.jsx(bn,{className:"yaymail-controls-container",children:null==GP?void 0:GP.map((({key:e,label:t})=>Mn.jsx(hH,{max:o??300,min:i??0,label:t,value:(null==a?void 0:a[e])||0,onChange:c(e)},e)))})]})},KP=window.React.useCallback,QP=window.React.useMemo,XP=e=>{const{value_path:t,default_value:n,title:i,layout:o}=e||{},r=QP((()=>t??"value"),[t]),a=eM((e=>{var t;return YE(null==(t=e.chosenElement)?void 0:t.data,r)})),s=eM((e=>e.updateChosenElementData)),l=KP((e=>{s((t=>{ZE(t,r,e)}),{attribute:i??""})}),[s,r,i]);return Mn.jsxs("div",{className:"yaymail-editor-property yaymail-editor-property-switcher","data-layout":o??"inline",children:[Mn.jsx("div",{className:"yaymail-title",children:__(i??"Text")}),Mn.jsx(ww,{checked:a??n,onChange:l})]})},JP=window.React.useEffect,ez=(e,t)=>{const n=new CustomEvent(e,{detail:t});document.dispatchEvent(n)},{Option:tz}=Qt,nz=Mn.jsx(Mn.Fragment,{children:window.yaymailData.builder.font_families.map((e=>Mn.jsx(tz,{value:e,label:e,children:Mn.jsx("span",{style:{fontFamily:e,fontWeight:400},children:e})},e)))}),iz=[{label:__("Default","yaymail"),value:"default",color:"#3498db"},{label:__("Info","yaymail"),value:"info",color:"#5bc0de"},{label:__("Success","yaymail"),value:"success",color:"#5cb85c"},{label:__("Warning","yaymail"),value:"warning",color:"#f0ad4e"},{label:__("Danger","yaymail"),value:"danger",color:"#d9534f"}],oz=[{label:__("Inherit","yaymail"),value:"inherit"},{label:__("Normal","yaymail"),value:"normal"},{label:__("Bold","yaymail"),value:"bold"},{label:__("Bolder","yaymail"),value:"bolder"},{label:__("Lighter","yaymail"),value:"lighter"},{label:"100",value:"100"},{label:"200",value:"200"},{label:"300",value:"300"},{label:"400",value:"400"},{label:"500",value:"500"},{label:"600",value:"600"},{label:"700",value:"700"},{label:"800",value:"800"},{label:"900",value:"900"}],rz=[{label:__("Default","yaymail"),value:"default",size:26},{label:__("Small","yaymail"),value:"small",size:15},{label:__("Medium","yaymail"),value:"medium",size:19},{label:__("Large","yaymail"),value:"large",size:29},{label:__("XL","yaymail"),value:"xl",size:39},{label:__("XXL","yaymail"),value:"xxl",size:59}],az=[{label:__("Solid","yaymail"),value:"solid"},{label:__("Double","yaymail"),value:"double"},{label:__("Dotted","yaymail"),value:"dotted"},{label:__("Dashed","yaymail"),value:"dashed"}],sz=null==(nt=null==(tt=window.yaymailData.builder.social_icons)?void 0:tt.themes)?void 0:nt.map((e=>{return{key:e,value:e,label:__((t=e,t.split(/(?=[A-Z])/).map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" ")))};var t}));__("Solid","yaymail"),__("Dashed","yaymail"),__("Dotted","yaymail");const lz=window.React.useState,cz=()=>Mn.jsxs(Mn.Fragment,{children:[Mn.jsx(qP,{value_path:"image_box.column_1.padding.value",title:__("Padding","yaymail")}),Mn.jsx(yH,{value_path:"image_box.column_1.align.value"}),Mn.jsx(Wz,{value_path:"image_box.column_1.image.value"}),Mn.jsx(wP,{value_path:"image_box.column_1.width.value",title:__("Width","yaymail")}),Mn.jsx(SP,{value_path:"image_box.column_1.url.value",default_value:"#",title:__("URL","yaymail")}),Mn.jsx(SP,{value_path:"image_box.column_1.alt.value",title:__("ALT text","yaymail"),default_value:""})]}),uz=()=>Mn.jsxs(Mn.Fragment,{children:[Mn.jsx(qP,{value_path:"image_box.column_2.padding.value"}),Mn.jsx(ZH,{value_path:"image_box.column_2.font_family.value",title:__("Font family","yaymail"),children:nz}),Mn.jsx(BP,{value_path:"image_box.column_2.rich_text.value",editor_id:"yaymail-image-box-text-editor"})]}),dz=()=>{const[e,t]=lz("column_1");return JP((()=>(((e,t)=>{document.addEventListener(e,t)})(n,i),()=>{((e,t)=>{document.removeEventListener(e,t)})(n,i)})),[n="onYayMailImageBoxColumnSelected",i=e=>{t(e.detail)}]),Mn.jsxs(Mn.Fragment,{children:["column_1"===e&&Mn.jsx(cz,{}),"column_2"===e&&Mn.jsx(uz,{})]});var n,i},hz=lE()(nE(eE(iE((e=>({selectedColumn:null,selectedElement:null,selectColumn:t=>{e((e=>{e.selectedColumn=t}))}}))))),oE),pz=()=>{const e=hz((e=>e.selectedColumn));return Mn.jsxs(Mn.Fragment,{children:[Mn.jsx(pP,{title:__("Copy column","yaymail"),store:hz}),Mn.jsxs("div",{style:{display:1==e?"block":"none"},children:[Mn.jsx(qP,{value_path:"image_list.column_1.padding.value",title:__("Padding","yaymail")}),Mn.jsx(yH,{value_path:"image_list.column_1.align.value"}),Mn.jsx(Wz,{value_path:"image_list.column_1.image.value"}),Mn.jsx(wP,{value_path:"image_list.column_1.width.value",min:0,max:140,title:__("Width","yaymail")}),Mn.jsx(SP,{value_path:"image_list.column_1.url.value",default_value:"#",title:__("URL","yaymail")}),Mn.jsx(SP,{value_path:"image_list.column_1.alt.value",title:__("ALT text","yaymail"),default_value:""})]}),Mn.jsxs("div",{style:{display:2==e?"block":"none"},children:[Mn.jsx(qP,{value_path:"image_list.column_2.padding.value",title:__("Padding","yaymail")}),Mn.jsx(yH,{value_path:"image_list.column_2.align.value"}),Mn.jsx(Wz,{value_path:"image_list.column_2.image.value"}),Mn.jsx(wP,{value_path:"image_list.column_2.width.value",min:0,max:140,title:__("Width","yaymail")}),Mn.jsx(SP,{value_path:"image_list.column_2.url.value",default_value:"#",title:__("URL","yaymail")}),Mn.jsx(SP,{value_path:"image_list.column_2.alt.value",title:__("ALT text","yaymail"),default_value:""})]}),Mn.jsxs("div",{style:{display:3==e?"block":"none"},children:[Mn.jsx(qP,{value_path:"image_list.column_3.padding.value",title:__("Padding","yaymail")}),Mn.jsx(yH,{value_path:"image_list.column_3.align.value"}),Mn.jsx(Wz,{value_path:"image_list.column_3.image.value"}),Mn.jsx(wP,{value_path:"image_list.column_3.width.value",min:0,max:140,title:__("Width","yaymail")}),Mn.jsx(SP,{value_path:"image_list.column_3.url.value",default_value:"#",title:__("URL","yaymail")}),Mn.jsx(SP,{value_path:"image_list.column_3.alt.value",title:__("ALT text","yaymail"),default_value:""})]})]})},mz=window.React.useCallback,fz=window.React.useMemo,gz=window.React.useState,yz=(window.yaymailData.builder.social_icons.images??[]).map((e=>{var t;return{name:e.name,src:null==(t=e.data.find((e=>"Colorful"===e.theme)))?void 0:t.src}})),vz=e=>{const{title:t,value_path:n}=e||{},i=n??"icon_list",o=fz((()=>__(t??"Sortable List")),[]),r=eM((e=>e.updateChosenElementData)),a=eM((e=>{var t;return YE(null==(t=e.chosenElement)?void 0:t.data,i)})),s=mz((()=>{r((e=>{const t=yz.filter((t=>(e.icon_list??[]).every((e=>e.icon!==t.name))));ZE(e,i,[...a??[],{url:"#",icon:(t[0]??yz[0]).name??""}])}),{attribute:__("Add social item","yaymail")})}),[a,r,i]);return Mn.jsxs("div",{className:"yaymail-editor-property yaymail-editor-property-social-list",children:[Mn.jsx("div",{className:"yaymail-title",children:o}),Mn.jsx(bz,{valuePath:i}),Mn.jsxs("div",{className:"yaymail-btn-add-social",onClick:s,children:["+ ",__("Add social","yaymail")]})]})};function bz({valuePath:e}){const t=eM((t=>{var n;return(YE(null==(n=t.chosenElement)?void 0:n.data,e)??[]).map((({icon:e,url:t},n)=>({id:n,icon:e,url:t})))})),n=eM((e=>e.updateChosenElementData));return Mn.jsx(VT.ReactSortable,{list:t,setList:t=>{const i=t.map((({icon:e,url:t})=>({icon:e,url:t})));n((t=>{ZE(t,e,i)}),{attribute:__("Add item","yaymail")})},handle:".yaymail-social-item__handle",ghostClass:"yaymail-ghost-social-icons",group:{name:"yaymail-social-icons",pull:!1},children:t.map(((t,n)=>Mn.jsx(wz,{item:t,position:n,valuePath:e},t.id)))})}function wz({item:e,position:t,valuePath:n}){const[i,o]=gz(!1),r=eM((e=>e.updateChosenElementData)),a=mz((e=>{e.stopPropagation(),r((e=>{ZE(e,n,e[n].filter(((e,n)=>n!=t)))}),{attribute:__("Delete item","yaymail")})}),[r,t]),s=mz((e=>{r((i=>{ZE(i,n,i[n].map(((n,i)=>i==t?{...n,icon:e}:n)))}),{attribute:__("Change icon","yaymail")})}),[r,t]),l=mz((e=>{r((i=>{ZE(i,n,i[n].map(((n,i)=>i==t?{...n,url:e.target.value}:n)))}),{attribute:__("Change url","yaymail")})}),[r,t]);return Mn.jsxs("div",{className:"yaymail-social-item"+(i?" editing":""),children:[Mn.jsxs("div",{className:"yaymail-social-item__header",onClick:()=>o((e=>!e)),children:[Mn.jsx("span",{className:"yaymail-social-item__handle",children:Mn.jsx(qI,{style:{fontSize:14}})}),Mn.jsx("span",{className:"yaymail-social-item__label yaymail-capitalized",children:e.icon}),Mn.jsx("span",{className:"yaymail-social-item__btn-delete",onClick:a,children:Mn.jsx(yI,{})})]}),i&&Mn.jsxs("div",{className:"yaymail-social-item__edit-section",children:[Mn.jsx(Qt,{style:{width:"100%"},value:e.icon,onChange:s,children:yz.map((({name:e,src:t})=>Mn.jsx(Qt.Option,{value:e,label:e,children:Mn.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[Mn.jsx("img",{src:t,alt:e,height:12}),Mn.jsx("span",{style:{textTransform:"capitalize",marginLeft:10},children:e})]})},e)))}),Mn.jsx(bb,{className:"yaymail-custom-input",value:e.url,onChange:l})]})]},e.id)}const xz=lE()(nE(eE(iE((e=>({selectedColumn:null,selectedElement:null,selectColumn:t=>{e((e=>{e.selectedColumn=t}))},selectElement:t=>{e((e=>{e.selectedElement=t}))}}))))),oE),Cz=window.React.useCallback,_z=[1,2,3],Sz=()=>{const e=Number(eM((e=>{var t;return lP(null==(t=e.chosenElement)?void 0:t.data,"number_column")}))),t=Cz((e=>`text_list.column_${e}.show_button`),[]),n=eM((e=>{var n;return lP(null==(n=e.chosenElement)?void 0:n.data,t(1))})),i=eM((e=>{var n;return lP(null==(n=e.chosenElement)?void 0:n.data,t(2))})),o=eM((e=>{var n;return lP(null==(n=e.chosenElement)?void 0:n.data,t(3))})),r=eM((e=>e.updateChosenElementData)),a=Cz((e=>{const n=t(e);r((e=>{const t=lP(e,n);cP(e,n,!t)}),{attribute:__("Show/Hide button","yaymail")})}),[r]),s=Cz((e=>({1:Boolean(n),2:Boolean(i),3:Boolean(o)}[e])),[n,i,o]),l=Cz((t=>{let n=["yaymail-select-button-option"];return(e??1)>=t&&n.push("yaymail-select-button-option-show"),s(t)&&n.push("yaymail-select-button-option-active"),n.join(" ")}),[e,s]);return Mn.jsxs("div",{className:"yaymail-editor-property yaymail-editor-property-select-button",children:[Mn.jsx("div",{className:"yaymail-title",children:__("Show button in column:","yaymail")}),Mn.jsx("div",{className:"yaymail-controls-container",children:Mn.jsx("div",{className:"yaymail-select-button-wrapper",children:_z.map((e=>Mn.jsx("div",{className:l(e),onClick:()=>a(e),children:Mn.jsx("span",{children:e})},e)))})})]})},kz=window.React.useCallback,Ez=[1,2,3],$z=()=>{const e=xz((e=>e.selectedColumn))??0;return Mn.jsxs(Mn.Fragment,{children:[Mn.jsx(Sz,{}),Mn.jsx(pP,{title:__("Copy column","yaymail"),store:xz}),Ez.includes(e)&&Mn.jsx(Mz,{columnNumber:e})]})};function Mz({columnNumber:e}){const t=xz((e=>e.selectedElement)),n=eM((e=>e.updateChosenElementData)),i=kz((t=>`text_list.column_${e}.${t}.value`),[e]);return Mn.jsxs(Mn.Fragment,{children:[Mn.jsxs("div",{style:{display:1==t?"block":"none"},children:[Mn.jsx(qP,{value_path:i("padding"),title:__("Padding","yaymail")}),Mn.jsx(ZH,{value_path:i("font_family"),title:__("Font family","yaymail"),children:nz}),Mn.jsx(BP,{value_path:i("rich_text"),editor_id:`text-list-element-editor-column-${e}`})]}),Mn.jsxs("div",{style:{display:2==t?"block":"none"},children:[Mn.jsx(ZH,{value_path:i("button_type"),options:iz,defaultValue:iz[0]??"default",title:__("Type","yaymail"),onChange:e=>{var t;const o=(null==(t=iz.find((t=>t.value===e)))?void 0:t.color)??"";n((t=>{cP(t,i("button_type"),e)}),{attribute:__("Button Type","yaymail")}),n((e=>{cP(e,i("button_background_color"),o)}),{})}}),Mn.jsx(yH,{value_path:i("button_align")}),Mn.jsx(qP,{value_path:i("button_padding"),title:__("Padding","yaymail")}),Mn.jsx(Iz,{value_path:i("button_border_radius"),title:__("Border radius","yaymail")}),Mn.jsx(SP,{value_path:i("button_text"),title:__("Button text","yaymail"),default_value:__("Click me","yaymail")}),Mn.jsx(SP,{value_path:i("button_url"),title:__("URL","yaymail"),default_value:"#"}),Mn.jsx(fH,{itemList:[{Component:UH,props:{title:__("Background color","yaymail"),attribute:i("button_background_color"),value_path:i("button_background_color")}},{Component:UH,props:{title:__("Text color","yaymail"),attribute:i("button_text_color"),value_path:i("button_text_color")}}]}),Mn.jsx(wP,{value_path:i("button_font_size"),min:10,max:40,title:__("Font size","yaymail")}),Mn.jsx(wP,{value_path:i("button_height"),min:0,max:100,title:__("Height","yaymail")}),Mn.jsx(wP,{value_path:i("button_width"),min:0,max:100,unit:"%",title:__("Width","yaymail")}),Mn.jsx(ZH,{value_path:i("button_weight"),options:oz,defaultValue:oz[0]??"normal",title:__("Weight","yaymail")}),Mn.jsx(ZH,{value_path:i("button_font_family"),defaultValue:window.yaymailData.builder.font_families[0]??"",title:__("Font family","yaymail"),children:nz})]})]})}const Rz=e=>lO.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("g",{clipPath:"url(#clip0_2111_1547)"},lO.createElement("g",{clipPath:"url(#clip1_2111_1547)"},lO.createElement("mask",{id:"path-1-inside-1_2111_1547",fill:"white"},lO.createElement("path",{d:"M14 11C14 12.6569 12.6569 14 11 14L0 14C-1.65685 14 -3 12.6569 -3 11V0C-3 -1.65685 -1.65685 -3 0 -3H11C12.6569 -3 14 -1.65685 14 0L14 11Z"})),lO.createElement("path",{d:"M11 -3V-2.5C12.3807 -2.5 13.5 -1.38071 13.5 0H14H14.5C14.5 -1.933 12.933 -3.5 11 -3.5V-3ZM14 0H13.5V2.75H14H14.5V0H14ZM14 8.25H13.5V11H14H14.5V8.25H14ZM14 11H13.5C13.5 12.3807 12.3807 13.5 11 13.5V14V14.5C12.933 14.5 14.5 12.933 14.5 11H14ZM11 14V13.5H8.25V14V14.5H11V14ZM2.75 14V13.5H0V14V14.5H2.75V14ZM0 14V13.5C-1.38071 13.5 -2.5 12.3807 -2.5 11H-3H-3.5C-3.5 12.933 -1.933 14.5 0 14.5V14ZM-3 11H-2.5V8.25H-3H-3.5V11H-3ZM-3 2.75H-2.5V0H-3H-3.5V2.75H-3ZM-3 0H-2.5C-2.5 -1.38071 -1.38071 -2.5 0 -2.5V-3V-3.5C-1.933 -3.5 -3.5 -1.933 -3.5 0H-3ZM0 -3V-2.5H2.75V-3V-3.5H0V-3ZM8.25 -3V-2.5H11V-3V-3.5H8.25V-3ZM11 -3V-2C12.1046 -2 13 -1.10457 13 0H14H15C15 -2.20914 13.2091 -4 11 -4V-3ZM14 0H13V2.75H14H15V0H14ZM14 8.25H13V11H14H15V8.25H14ZM14 11H13C13 12.1046 12.1046 13 11 13V14V15C13.2091 15 15 13.2091 15 11H14ZM11 14V13H8.25V14V15H11V14ZM2.75 14V13H0V14V15H2.75V14ZM0 14V13C-1.10457 13 -2 12.1046 -2 11H-3H-4C-4 13.2091 -2.20914 15 0 15V14ZM-3 11H-2V8.25H-3H-4V11H-3ZM-3 2.75H-2V0H-3H-4V2.75H-3ZM-3 0H-2C-2 -1.10457 -1.10457 -2 0 -2V-3V-4C-2.20914 -4 -4 -2.20914 -4 0H-3ZM0 -3V-2H2.75V-3V-4H0V-3ZM8.25 -3V-2H11V-3V-4H8.25V-3Z",fill:"#4E4E4E",mask:"url(#path-1-inside-1_2111_1547)"})),lO.createElement("g",{clipPath:"url(#clip2_2111_1547)"},lO.createElement("mask",{id:"path-3-inside-2_2111_1547",fill:"white"},lO.createElement("path",{d:"M3 14C1.34315 14 0 12.6569 0 11L0 0C0 -1.65685 1.34315 -3 3 -3H14C15.6569 -3 17 -1.65685 17 0V11C17 12.6569 15.6569 14 14 14H3Z"})),lO.createElement("path",{d:"M17 11H16.5C16.5 12.3807 15.3807 13.5 14 13.5V14V14.5C15.933 14.5 17.5 12.933 17.5 11H17ZM14 14V13.5H11.25V14V14.5H14V14ZM5.75 14V13.5H3V14V14.5H5.75V14ZM3 14V13.5C1.61929 13.5 0.5 12.3807 0.5 11H0H-0.5C-0.5 12.933 1.067 14.5 3 14.5V14ZM0 11H0.5L0.5 8.25H0H-0.5L-0.5 11H0ZM0 2.75H0.5L0.5 0H0H-0.5L-0.5 2.75H0ZM0 0H0.5C0.5 -1.38071 1.61929 -2.5 3 -2.5V-3V-3.5C1.067 -3.5 -0.5 -1.933 -0.5 0H0ZM3 -3V-2.5H5.75V-3V-3.5H3V-3ZM11.25 -3V-2.5H14V-3V-3.5H11.25V-3ZM14 -3V-2.5C15.3807 -2.5 16.5 -1.38071 16.5 0H17H17.5C17.5 -1.933 15.933 -3.5 14 -3.5V-3ZM17 0H16.5V2.75H17H17.5V0H17ZM17 8.25H16.5V11H17H17.5V8.25H17ZM17 11H16C16 12.1046 15.1046 13 14 13V14V15C16.2091 15 18 13.2091 18 11H17ZM14 14V13H11.25V14V15H14V14ZM5.75 14V13H3V14V15H5.75V14ZM3 14V13C1.89543 13 1 12.1046 1 11H0H-1C-1 13.2091 0.790861 15 3 15V14ZM0 11H1L1 8.25H0H-1L-1 11H0ZM0 2.75H1L1 0H0H-1L-1 2.75H0ZM0 0H1C1 -1.10457 1.89543 -2 3 -2V-3V-4C0.790861 -4 -1 -2.20914 -1 0H0ZM3 -3V-2H5.75V-3V-4H3V-3ZM11.25 -3V-2H14V-3V-4H11.25V-3ZM14 -3V-2C15.1046 -2 16 -1.10457 16 0H17H18C18 -2.20914 16.2091 -4 14 -4V-3ZM17 0H16V2.75H17H18V0H17ZM17 8.25H16V11H17H18V8.25H17Z",fill:"white",mask:"url(#path-3-inside-2_2111_1547)"})),lO.createElement("g",{clipPath:"url(#clip3_2111_1547)"},lO.createElement("mask",{id:"path-5-inside-3_2111_1547",fill:"white"},lO.createElement("path",{d:"M0 3C0 1.34315 1.34315 0 3 0H14C15.6569 0 17 1.34315 17 3V14C17 15.6569 15.6569 17 14 17H3C1.34315 17 0 15.6569 0 14V3Z"})),lO.createElement("path",{d:"M3 17V16.5C1.61929 16.5 0.5 15.3807 0.5 14H0H-0.5C-0.5 15.933 1.067 17.5 3 17.5V17ZM0 14H0.5V11.25H0H-0.5V14H0ZM0 5.75H0.5V3H0H-0.5V5.75H0ZM0 3H0.5C0.5 1.61929 1.61929 0.5 3 0.5V0V-0.5C1.067 -0.5 -0.5 1.067 -0.5 3H0ZM3 0V0.5H5.75V0V-0.5H3V0ZM11.25 0V0.5H14V0V-0.5H11.25V0ZM14 0V0.5C15.3807 0.5 16.5 1.61929 16.5 3H17H17.5C17.5 1.067 15.933 -0.5 14 -0.5V0ZM17 3H16.5V5.75H17H17.5V3H17ZM17 11.25H16.5V14H17H17.5V11.25H17ZM17 14H16.5C16.5 15.3807 15.3807 16.5 14 16.5V17V17.5C15.933 17.5 17.5 15.933 17.5 14H17ZM14 17V16.5H11.25V17V17.5H14V17ZM5.75 17V16.5H3V17V17.5H5.75V17ZM3 17V16C1.89543 16 1 15.1046 1 14H0H-1C-1 16.2091 0.790861 18 3 18V17ZM0 14H1V11.25H0H-1V14H0ZM0 5.75H1V3H0H-1V5.75H0ZM0 3H1C1 1.89543 1.89543 1 3 1V0V-1C0.790861 -1 -1 0.790861 -1 3H0ZM3 0V1H5.75V0V-1H3V0ZM11.25 0V1H14V0V-1H11.25V0ZM14 0V1C15.1046 1 16 1.89543 16 3H17H18C18 0.790861 16.2091 -1 14 -1V0ZM17 3H16V5.75H17H18V3H17ZM17 11.25H16V14H17H18V11.25H17ZM17 14H16C16 15.1046 15.1046 16 14 16V17V18C16.2091 18 18 16.2091 18 14H17ZM14 17V16H11.25V17V18H14V17ZM5.75 17V16H3V17V18H5.75V17Z",fill:"#4E4E4E",mask:"url(#path-5-inside-3_2111_1547)"})),lO.createElement("g",{clipPath:"url(#clip4_2111_1547)"},lO.createElement("mask",{id:"path-7-inside-4_2111_1547",fill:"white"},lO.createElement("path",{d:"M11 0C12.6569 0 14 1.34315 14 3V14C14 15.6569 12.6569 17 11 17H0C-1.65685 17 -3 15.6569 -3 14V3C-3 1.34315 -1.65685 0 0 0L11 0Z"})),lO.createElement("path",{d:"M-3 3H-2.5C-2.5 1.61929 -1.38071 0.5 0 0.5V0V-0.5C-1.933 -0.5 -3.5 1.067 -3.5 3H-3ZM0 0V0.5H2.75V0V-0.5H0V0ZM8.25 0V0.5L11 0.5V0V-0.5L8.25 -0.5V0ZM11 0V0.5C12.3807 0.5 13.5 1.61929 13.5 3H14H14.5C14.5 1.067 12.933 -0.5 11 -0.5V0ZM14 3H13.5V5.75H14H14.5V3H14ZM14 11.25H13.5V14H14H14.5V11.25H14ZM14 14H13.5C13.5 15.3807 12.3807 16.5 11 16.5V17V17.5C12.933 17.5 14.5 15.933 14.5 14H14ZM11 17V16.5H8.25V17V17.5H11V17ZM2.75 17V16.5H0V17V17.5H2.75V17ZM0 17V16.5C-1.38071 16.5 -2.5 15.3807 -2.5 14H-3H-3.5C-3.5 15.933 -1.933 17.5 0 17.5V17ZM-3 14H-2.5V11.25H-3H-3.5V14H-3ZM-3 5.75H-2.5V3H-3H-3.5V5.75H-3ZM-3 3H-2C-2 1.89543 -1.10457 1 0 1V0V-1C-2.20914 -1 -4 0.790861 -4 3H-3ZM0 0V1H2.75V0V-1H0V0ZM8.25 0V1L11 1V0V-1H8.25V0ZM11 0V1C12.1046 1 13 1.89543 13 3H14H15C15 0.790861 13.2091 -1 11 -1V0ZM14 3H13V5.75H14H15V3H14ZM14 11.25H13V14H14H15V11.25H14ZM14 14H13C13 15.1046 12.1046 16 11 16V17V18C13.2091 18 15 16.2091 15 14H14ZM11 17V16H8.25V17V18H11V17ZM2.75 17V16H0V17V18H2.75V17ZM0 17V16C-1.10457 16 -2 15.1046 -2 14H-3H-4C-4 16.2091 -2.20914 18 0 18V17ZM-3 14H-2V11.25H-3H-4V14H-3ZM-3 5.75H-2V3H-3H-4V5.75H-3Z",fill:"#4E4E4E",mask:"url(#path-7-inside-4_2111_1547)"}))),lO.createElement("defs",null,lO.createElement("clipPath",{id:"clip0_2111_1547"},lO.createElement("rect",{width:14,height:14,fill:"white"})),lO.createElement("clipPath",{id:"clip1_2111_1547"},lO.createElement("rect",{width:6,height:6,fill:"white",transform:"matrix(-1 0 0 -1 14 14)"})),lO.createElement("clipPath",{id:"clip2_2111_1547"},lO.createElement("rect",{width:6,height:6,fill:"white",transform:"matrix(0 -1 1 0 0 14)"})),lO.createElement("clipPath",{id:"clip3_2111_1547"},lO.createElement("rect",{width:6,height:6,fill:"white"})),lO.createElement("clipPath",{id:"clip4_2111_1547"},lO.createElement("rect",{width:6,height:6,fill:"white",transform:"matrix(0 1 -1 0 14 0)"})))),Az=e=>lO.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("g",{clipPath:"url(#clip0_2111_1538)"},lO.createElement("g",{clipPath:"url(#clip1_2111_1538)"},lO.createElement("mask",{id:"path-1-inside-1_2111_1538",fill:"white"},lO.createElement("path",{d:"M14 11C14 12.6569 12.6569 14 11 14L0 14C-1.65685 14 -3 12.6569 -3 11V0C-3 -1.65685 -1.65685 -3 0 -3H11C12.6569 -3 14 -1.65685 14 0L14 11Z"})),lO.createElement("path",{d:"M11 -3V-2.5C12.3807 -2.5 13.5 -1.38071 13.5 0H14H14.5C14.5 -1.933 12.933 -3.5 11 -3.5V-3ZM14 0H13.5V2.75H14H14.5V0H14ZM14 8.25H13.5V11H14H14.5V8.25H14ZM14 11H13.5C13.5 12.3807 12.3807 13.5 11 13.5V14V14.5C12.933 14.5 14.5 12.933 14.5 11H14ZM11 14V13.5H8.25V14V14.5H11V14ZM2.75 14V13.5H0V14V14.5H2.75V14ZM0 14V13.5C-1.38071 13.5 -2.5 12.3807 -2.5 11H-3H-3.5C-3.5 12.933 -1.933 14.5 0 14.5V14ZM-3 11H-2.5V8.25H-3H-3.5V11H-3ZM-3 2.75H-2.5V0H-3H-3.5V2.75H-3ZM-3 0H-2.5C-2.5 -1.38071 -1.38071 -2.5 0 -2.5V-3V-3.5C-1.933 -3.5 -3.5 -1.933 -3.5 0H-3ZM0 -3V-2.5H2.75V-3V-3.5H0V-3ZM8.25 -3V-2.5H11V-3V-3.5H8.25V-3ZM11 -3V-2C12.1046 -2 13 -1.10457 13 0H14H15C15 -2.20914 13.2091 -4 11 -4V-3ZM14 0H13V2.75H14H15V0H14ZM14 8.25H13V11H14H15V8.25H14ZM14 11H13C13 12.1046 12.1046 13 11 13V14V15C13.2091 15 15 13.2091 15 11H14ZM11 14V13H8.25V14V15H11V14ZM2.75 14V13H0V14V15H2.75V14ZM0 14V13C-1.10457 13 -2 12.1046 -2 11H-3H-4C-4 13.2091 -2.20914 15 0 15V14ZM-3 11H-2V8.25H-3H-4V11H-3ZM-3 2.75H-2V0H-3H-4V2.75H-3ZM-3 0H-2C-2 -1.10457 -1.10457 -2 0 -2V-3V-4C-2.20914 -4 -4 -2.20914 -4 0H-3ZM0 -3V-2H2.75V-3V-4H0V-3ZM8.25 -3V-2H11V-3V-4H8.25V-3Z",fill:"white",mask:"url(#path-1-inside-1_2111_1538)"})),lO.createElement("g",{clipPath:"url(#clip2_2111_1538)"},lO.createElement("mask",{id:"path-3-inside-2_2111_1538",fill:"white"},lO.createElement("path",{d:"M3 14C1.34315 14 0 12.6569 0 11L0 0C0 -1.65685 1.34315 -3 3 -3H14C15.6569 -3 17 -1.65685 17 0V11C17 12.6569 15.6569 14 14 14H3Z"})),lO.createElement("path",{d:"M17 11H16.5C16.5 12.3807 15.3807 13.5 14 13.5V14V14.5C15.933 14.5 17.5 12.933 17.5 11H17ZM14 14V13.5H11.25V14V14.5H14V14ZM5.75 14V13.5H3V14V14.5H5.75V14ZM3 14V13.5C1.61929 13.5 0.5 12.3807 0.5 11H0H-0.5C-0.5 12.933 1.067 14.5 3 14.5V14ZM0 11H0.5L0.5 8.25H0H-0.5L-0.5 11H0ZM0 2.75H0.5L0.5 0H0H-0.5L-0.5 2.75H0ZM0 0H0.5C0.5 -1.38071 1.61929 -2.5 3 -2.5V-3V-3.5C1.067 -3.5 -0.5 -1.933 -0.5 0H0ZM3 -3V-2.5H5.75V-3V-3.5H3V-3ZM11.25 -3V-2.5H14V-3V-3.5H11.25V-3ZM14 -3V-2.5C15.3807 -2.5 16.5 -1.38071 16.5 0H17H17.5C17.5 -1.933 15.933 -3.5 14 -3.5V-3ZM17 0H16.5V2.75H17H17.5V0H17ZM17 8.25H16.5V11H17H17.5V8.25H17ZM17 11H16C16 12.1046 15.1046 13 14 13V14V15C16.2091 15 18 13.2091 18 11H17ZM14 14V13H11.25V14V15H14V14ZM5.75 14V13H3V14V15H5.75V14ZM3 14V13C1.89543 13 1 12.1046 1 11H0H-1C-1 13.2091 0.790861 15 3 15V14ZM0 11H1L1 8.25H0H-1L-1 11H0ZM0 2.75H1L1 0H0H-1L-1 2.75H0ZM0 0H1C1 -1.10457 1.89543 -2 3 -2V-3V-4C0.790861 -4 -1 -2.20914 -1 0H0ZM3 -3V-2H5.75V-3V-4H3V-3ZM11.25 -3V-2H14V-3V-4H11.25V-3ZM14 -3V-2C15.1046 -2 16 -1.10457 16 0H17H18C18 -2.20914 16.2091 -4 14 -4V-3ZM17 0H16V2.75H17H18V0H17ZM17 8.25H16V11H17H18V8.25H17Z",fill:"#4E4E4E",mask:"url(#path-3-inside-2_2111_1538)"})),lO.createElement("g",{clipPath:"url(#clip3_2111_1538)"},lO.createElement("mask",{id:"path-5-inside-3_2111_1538",fill:"white"},lO.createElement("path",{d:"M0 3C0 1.34315 1.34315 0 3 0H14C15.6569 0 17 1.34315 17 3V14C17 15.6569 15.6569 17 14 17H3C1.34315 17 0 15.6569 0 14V3Z"})),lO.createElement("path",{d:"M3 17V16.5C1.61929 16.5 0.5 15.3807 0.5 14H0H-0.5C-0.5 15.933 1.067 17.5 3 17.5V17ZM0 14H0.5V11.25H0H-0.5V14H0ZM0 5.75H0.5V3H0H-0.5V5.75H0ZM0 3H0.5C0.5 1.61929 1.61929 0.5 3 0.5V0V-0.5C1.067 -0.5 -0.5 1.067 -0.5 3H0ZM3 0V0.5H5.75V0V-0.5H3V0ZM11.25 0V0.5H14V0V-0.5H11.25V0ZM14 0V0.5C15.3807 0.5 16.5 1.61929 16.5 3H17H17.5C17.5 1.067 15.933 -0.5 14 -0.5V0ZM17 3H16.5V5.75H17H17.5V3H17ZM17 11.25H16.5V14H17H17.5V11.25H17ZM17 14H16.5C16.5 15.3807 15.3807 16.5 14 16.5V17V17.5C15.933 17.5 17.5 15.933 17.5 14H17ZM14 17V16.5H11.25V17V17.5H14V17ZM5.75 17V16.5H3V17V17.5H5.75V17ZM3 17V16C1.89543 16 1 15.1046 1 14H0H-1C-1 16.2091 0.790861 18 3 18V17ZM0 14H1V11.25H0H-1V14H0ZM0 5.75H1V3H0H-1V5.75H0ZM0 3H1C1 1.89543 1.89543 1 3 1V0V-1C0.790861 -1 -1 0.790861 -1 3H0ZM3 0V1H5.75V0V-1H3V0ZM11.25 0V1H14V0V-1H11.25V0ZM14 0V1C15.1046 1 16 1.89543 16 3H17H18C18 0.790861 16.2091 -1 14 -1V0ZM17 3H16V5.75H17H18V3H17ZM17 11.25H16V14H17H18V11.25H17ZM17 14H16C16 15.1046 15.1046 16 14 16V17V18C16.2091 18 18 16.2091 18 14H17ZM14 17V16H11.25V17V18H14V17ZM5.75 17V16H3V17V18H5.75V17Z",fill:"#4E4E4E",mask:"url(#path-5-inside-3_2111_1538)"})),lO.createElement("g",{clipPath:"url(#clip4_2111_1538)"},lO.createElement("mask",{id:"path-7-inside-4_2111_1538",fill:"white"},lO.createElement("path",{d:"M11 0C12.6569 0 14 1.34315 14 3V14C14 15.6569 12.6569 17 11 17H0C-1.65685 17 -3 15.6569 -3 14V3C-3 1.34315 -1.65685 0 0 0L11 0Z"})),lO.createElement("path",{d:"M-3 3H-2.5C-2.5 1.61929 -1.38071 0.5 0 0.5V0V-0.5C-1.933 -0.5 -3.5 1.067 -3.5 3H-3ZM0 0V0.5H2.75V0V-0.5H0V0ZM8.25 0V0.5L11 0.5V0V-0.5L8.25 -0.5V0ZM11 0V0.5C12.3807 0.5 13.5 1.61929 13.5 3H14H14.5C14.5 1.067 12.933 -0.5 11 -0.5V0ZM14 3H13.5V5.75H14H14.5V3H14ZM14 11.25H13.5V14H14H14.5V11.25H14ZM14 14H13.5C13.5 15.3807 12.3807 16.5 11 16.5V17V17.5C12.933 17.5 14.5 15.933 14.5 14H14ZM11 17V16.5H8.25V17V17.5H11V17ZM2.75 17V16.5H0V17V17.5H2.75V17ZM0 17V16.5C-1.38071 16.5 -2.5 15.3807 -2.5 14H-3H-3.5C-3.5 15.933 -1.933 17.5 0 17.5V17ZM-3 14H-2.5V11.25H-3H-3.5V14H-3ZM-3 5.75H-2.5V3H-3H-3.5V5.75H-3ZM-3 3H-2C-2 1.89543 -1.10457 1 0 1V0V-1C-2.20914 -1 -4 0.790861 -4 3H-3ZM0 0V1H2.75V0V-1H0V0ZM8.25 0V1L11 1V0V-1H8.25V0ZM11 0V1C12.1046 1 13 1.89543 13 3H14H15C15 0.790861 13.2091 -1 11 -1V0ZM14 3H13V5.75H14H15V3H14ZM14 11.25H13V14H14H15V11.25H14ZM14 14H13C13 15.1046 12.1046 16 11 16V17V18C13.2091 18 15 16.2091 15 14H14ZM11 17V16H8.25V17V18H11V17ZM2.75 17V16H0V17V18H2.75V17ZM0 17V16C-1.10457 16 -2 15.1046 -2 14H-3H-4C-4 16.2091 -2.20914 18 0 18V17ZM-3 14H-2V11.25H-3H-4V14H-3ZM-3 5.75H-2V3H-3H-4V5.75H-3Z",fill:"#4E4E4E",mask:"url(#path-7-inside-4_2111_1538)"}))),lO.createElement("defs",null,lO.createElement("clipPath",{id:"clip0_2111_1538"},lO.createElement("rect",{width:14,height:14,fill:"white"})),lO.createElement("clipPath",{id:"clip1_2111_1538"},lO.createElement("rect",{width:6,height:6,fill:"white",transform:"matrix(-1 0 0 -1 14 14)"})),lO.createElement("clipPath",{id:"clip2_2111_1538"},lO.createElement("rect",{width:6,height:6,fill:"white",transform:"matrix(0 -1 1 0 0 14)"})),lO.createElement("clipPath",{id:"clip3_2111_1538"},lO.createElement("rect",{width:6,height:6,fill:"white"})),lO.createElement("clipPath",{id:"clip4_2111_1538"},lO.createElement("rect",{width:6,height:6,fill:"white",transform:"matrix(0 1 -1 0 14 0)"})))),Oz=e=>lO.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("g",{clipPath:"url(#clip0_2111_1495)"},lO.createElement("g",{clipPath:"url(#clip1_2111_1495)"},lO.createElement("mask",{id:"path-1-inside-1_2111_1495",fill:"white"},lO.createElement("path",{d:"M14 11C14 12.6569 12.6569 14 11 14L0 14C-1.65685 14 -3 12.6569 -3 11V0C-3 -1.65685 -1.65685 -3 0 -3H11C12.6569 -3 14 -1.65685 14 0L14 11Z"})),lO.createElement("path",{d:"M11 -3V-2.5C12.3807 -2.5 13.5 -1.38071 13.5 0H14H14.5C14.5 -1.933 12.933 -3.5 11 -3.5V-3ZM14 0H13.5V2.75H14H14.5V0H14ZM14 8.25H13.5V11H14H14.5V8.25H14ZM14 11H13.5C13.5 12.3807 12.3807 13.5 11 13.5V14V14.5C12.933 14.5 14.5 12.933 14.5 11H14ZM11 14V13.5H8.25V14V14.5H11V14ZM2.75 14V13.5H0V14V14.5H2.75V14ZM0 14V13.5C-1.38071 13.5 -2.5 12.3807 -2.5 11H-3H-3.5C-3.5 12.933 -1.933 14.5 0 14.5V14ZM-3 11H-2.5V8.25H-3H-3.5V11H-3ZM-3 2.75H-2.5V0H-3H-3.5V2.75H-3ZM-3 0H-2.5C-2.5 -1.38071 -1.38071 -2.5 0 -2.5V-3V-3.5C-1.933 -3.5 -3.5 -1.933 -3.5 0H-3ZM0 -3V-2.5H2.75V-3V-3.5H0V-3ZM8.25 -3V-2.5H11V-3V-3.5H8.25V-3ZM11 -3V-2C12.1046 -2 13 -1.10457 13 0H14H15C15 -2.20914 13.2091 -4 11 -4V-3ZM14 0H13V2.75H14H15V0H14ZM14 8.25H13V11H14H15V8.25H14ZM14 11H13C13 12.1046 12.1046 13 11 13V14V15C13.2091 15 15 13.2091 15 11H14ZM11 14V13H8.25V14V15H11V14ZM2.75 14V13H0V14V15H2.75V14ZM0 14V13C-1.10457 13 -2 12.1046 -2 11H-3H-4C-4 13.2091 -2.20914 15 0 15V14ZM-3 11H-2V8.25H-3H-4V11H-3ZM-3 2.75H-2V0H-3H-4V2.75H-3ZM-3 0H-2C-2 -1.10457 -1.10457 -2 0 -2V-3V-4C-2.20914 -4 -4 -2.20914 -4 0H-3ZM0 -3V-2H2.75V-3V-4H0V-3ZM8.25 -3V-2H11V-3V-4H8.25V-3Z",fill:"#4E4E4E",mask:"url(#path-1-inside-1_2111_1495)"})),lO.createElement("g",{clipPath:"url(#clip2_2111_1495)"},lO.createElement("mask",{id:"path-3-inside-2_2111_1495",fill:"white"},lO.createElement("path",{d:"M3 14C1.34315 14 0 12.6569 0 11L0 0C0 -1.65685 1.34315 -3 3 -3H14C15.6569 -3 17 -1.65685 17 0V11C17 12.6569 15.6569 14 14 14H3Z"})),lO.createElement("path",{d:"M17 11H16.5C16.5 12.3807 15.3807 13.5 14 13.5V14V14.5C15.933 14.5 17.5 12.933 17.5 11H17ZM14 14V13.5H11.25V14V14.5H14V14ZM5.75 14V13.5H3V14V14.5H5.75V14ZM3 14V13.5C1.61929 13.5 0.5 12.3807 0.5 11H0H-0.5C-0.5 12.933 1.067 14.5 3 14.5V14ZM0 11H0.5L0.5 8.25H0H-0.5L-0.5 11H0ZM0 2.75H0.5L0.5 0H0H-0.5L-0.5 2.75H0ZM0 0H0.5C0.5 -1.38071 1.61929 -2.5 3 -2.5V-3V-3.5C1.067 -3.5 -0.5 -1.933 -0.5 0H0ZM3 -3V-2.5H5.75V-3V-3.5H3V-3ZM11.25 -3V-2.5H14V-3V-3.5H11.25V-3ZM14 -3V-2.5C15.3807 -2.5 16.5 -1.38071 16.5 0H17H17.5C17.5 -1.933 15.933 -3.5 14 -3.5V-3ZM17 0H16.5V2.75H17H17.5V0H17ZM17 8.25H16.5V11H17H17.5V8.25H17ZM17 11H16C16 12.1046 15.1046 13 14 13V14V15C16.2091 15 18 13.2091 18 11H17ZM14 14V13H11.25V14V15H14V14ZM5.75 14V13H3V14V15H5.75V14ZM3 14V13C1.89543 13 1 12.1046 1 11H0H-1C-1 13.2091 0.790861 15 3 15V14ZM0 11H1L1 8.25H0H-1L-1 11H0ZM0 2.75H1L1 0H0H-1L-1 2.75H0ZM0 0H1C1 -1.10457 1.89543 -2 3 -2V-3V-4C0.790861 -4 -1 -2.20914 -1 0H0ZM3 -3V-2H5.75V-3V-4H3V-3ZM11.25 -3V-2H14V-3V-4H11.25V-3ZM14 -3V-2C15.1046 -2 16 -1.10457 16 0H17H18C18 -2.20914 16.2091 -4 14 -4V-3ZM17 0H16V2.75H17H18V0H17ZM17 8.25H16V11H17H18V8.25H17Z",fill:"#4E4E4E",mask:"url(#path-3-inside-2_2111_1495)"})),lO.createElement("g",{clipPath:"url(#clip3_2111_1495)"},lO.createElement("mask",{id:"path-5-inside-3_2111_1495",fill:"white"},lO.createElement("path",{d:"M0 3C0 1.34315 1.34315 0 3 0H14C15.6569 0 17 1.34315 17 3V14C17 15.6569 15.6569 17 14 17H3C1.34315 17 0 15.6569 0 14V3Z"})),lO.createElement("path",{d:"M3 17V16.5C1.61929 16.5 0.5 15.3807 0.5 14H0H-0.5C-0.5 15.933 1.067 17.5 3 17.5V17ZM0 14H0.5V11.25H0H-0.5V14H0ZM0 5.75H0.5V3H0H-0.5V5.75H0ZM0 3H0.5C0.5 1.61929 1.61929 0.5 3 0.5V0V-0.5C1.067 -0.5 -0.5 1.067 -0.5 3H0ZM3 0V0.5H5.75V0V-0.5H3V0ZM11.25 0V0.5H14V0V-0.5H11.25V0ZM14 0V0.5C15.3807 0.5 16.5 1.61929 16.5 3H17H17.5C17.5 1.067 15.933 -0.5 14 -0.5V0ZM17 3H16.5V5.75H17H17.5V3H17ZM17 11.25H16.5V14H17H17.5V11.25H17ZM17 14H16.5C16.5 15.3807 15.3807 16.5 14 16.5V17V17.5C15.933 17.5 17.5 15.933 17.5 14H17ZM14 17V16.5H11.25V17V17.5H14V17ZM5.75 17V16.5H3V17V17.5H5.75V17ZM3 17V16C1.89543 16 1 15.1046 1 14H0H-1C-1 16.2091 0.790861 18 3 18V17ZM0 14H1V11.25H0H-1V14H0ZM0 5.75H1V3H0H-1V5.75H0ZM0 3H1C1 1.89543 1.89543 1 3 1V0V-1C0.790861 -1 -1 0.790861 -1 3H0ZM3 0V1H5.75V0V-1H3V0ZM11.25 0V1H14V0V-1H11.25V0ZM14 0V1C15.1046 1 16 1.89543 16 3H17H18C18 0.790861 16.2091 -1 14 -1V0ZM17 3H16V5.75H17H18V3H17ZM17 11.25H16V14H17H18V11.25H17ZM17 14H16C16 15.1046 15.1046 16 14 16V17V18C16.2091 18 18 16.2091 18 14H17ZM14 17V16H11.25V17V18H14V17ZM5.75 17V16H3V17V18H5.75V17Z",fill:"white",mask:"url(#path-5-inside-3_2111_1495)"})),lO.createElement("g",{clipPath:"url(#clip4_2111_1495)"},lO.createElement("mask",{id:"path-7-inside-4_2111_1495",fill:"white"},lO.createElement("path",{d:"M11 0C12.6569 0 14 1.34315 14 3V14C14 15.6569 12.6569 17 11 17H0C-1.65685 17 -3 15.6569 -3 14V3C-3 1.34315 -1.65685 0 0 0L11 0Z"})),lO.createElement("path",{d:"M-3 3H-2.5C-2.5 1.61929 -1.38071 0.5 0 0.5V0V-0.5C-1.933 -0.5 -3.5 1.067 -3.5 3H-3ZM0 0V0.5H2.75V0V-0.5H0V0ZM8.25 0V0.5L11 0.5V0V-0.5L8.25 -0.5V0ZM11 0V0.5C12.3807 0.5 13.5 1.61929 13.5 3H14H14.5C14.5 1.067 12.933 -0.5 11 -0.5V0ZM14 3H13.5V5.75H14H14.5V3H14ZM14 11.25H13.5V14H14H14.5V11.25H14ZM14 14H13.5C13.5 15.3807 12.3807 16.5 11 16.5V17V17.5C12.933 17.5 14.5 15.933 14.5 14H14ZM11 17V16.5H8.25V17V17.5H11V17ZM2.75 17V16.5H0V17V17.5H2.75V17ZM0 17V16.5C-1.38071 16.5 -2.5 15.3807 -2.5 14H-3H-3.5C-3.5 15.933 -1.933 17.5 0 17.5V17ZM-3 14H-2.5V11.25H-3H-3.5V14H-3ZM-3 5.75H-2.5V3H-3H-3.5V5.75H-3ZM-3 3H-2C-2 1.89543 -1.10457 1 0 1V0V-1C-2.20914 -1 -4 0.790861 -4 3H-3ZM0 0V1H2.75V0V-1H0V0ZM8.25 0V1L11 1V0V-1H8.25V0ZM11 0V1C12.1046 1 13 1.89543 13 3H14H15C15 0.790861 13.2091 -1 11 -1V0ZM14 3H13V5.75H14H15V3H14ZM14 11.25H13V14H14H15V11.25H14ZM14 14H13C13 15.1046 12.1046 16 11 16V17V18C13.2091 18 15 16.2091 15 14H14ZM11 17V16H8.25V17V18H11V17ZM2.75 17V16H0V17V18H2.75V17ZM0 17V16C-1.10457 16 -2 15.1046 -2 14H-3H-4C-4 16.2091 -2.20914 18 0 18V17ZM-3 14H-2V11.25H-3H-4V14H-3ZM-3 5.75H-2V3H-3H-4V5.75H-3Z",fill:"#4E4E4E",mask:"url(#path-7-inside-4_2111_1495)"}))),lO.createElement("defs",null,lO.createElement("clipPath",{id:"clip0_2111_1495"},lO.createElement("rect",{width:14,height:14,fill:"white"})),lO.createElement("clipPath",{id:"clip1_2111_1495"},lO.createElement("rect",{width:6,height:6,fill:"white",transform:"matrix(-1 0 0 -1 14 14)"})),lO.createElement("clipPath",{id:"clip2_2111_1495"},lO.createElement("rect",{width:6,height:6,fill:"white",transform:"matrix(0 -1 1 0 0 14)"})),lO.createElement("clipPath",{id:"clip3_2111_1495"},lO.createElement("rect",{width:6,height:6,fill:"white"})),lO.createElement("clipPath",{id:"clip4_2111_1495"},lO.createElement("rect",{width:6,height:6,fill:"white",transform:"matrix(0 1 -1 0 14 0)"})))),jz=e=>lO.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("g",{clipPath:"url(#clip0_2111_1511)"},lO.createElement("g",{clipPath:"url(#clip1_2111_1511)"},lO.createElement("mask",{id:"path-1-inside-1_2111_1511",fill:"white"},lO.createElement("path",{d:"M14 11C14 12.6569 12.6569 14 11 14L0 14C-1.65685 14 -3 12.6569 -3 11V0C-3 -1.65685 -1.65685 -3 0 -3H11C12.6569 -3 14 -1.65685 14 0L14 11Z"})),lO.createElement("path",{d:"M11 -3V-2.5C12.3807 -2.5 13.5 -1.38071 13.5 0H14H14.5C14.5 -1.933 12.933 -3.5 11 -3.5V-3ZM14 0H13.5V2.75H14H14.5V0H14ZM14 8.25H13.5V11H14H14.5V8.25H14ZM14 11H13.5C13.5 12.3807 12.3807 13.5 11 13.5V14V14.5C12.933 14.5 14.5 12.933 14.5 11H14ZM11 14V13.5H8.25V14V14.5H11V14ZM2.75 14V13.5H0V14V14.5H2.75V14ZM0 14V13.5C-1.38071 13.5 -2.5 12.3807 -2.5 11H-3H-3.5C-3.5 12.933 -1.933 14.5 0 14.5V14ZM-3 11H-2.5V8.25H-3H-3.5V11H-3ZM-3 2.75H-2.5V0H-3H-3.5V2.75H-3ZM-3 0H-2.5C-2.5 -1.38071 -1.38071 -2.5 0 -2.5V-3V-3.5C-1.933 -3.5 -3.5 -1.933 -3.5 0H-3ZM0 -3V-2.5H2.75V-3V-3.5H0V-3ZM8.25 -3V-2.5H11V-3V-3.5H8.25V-3ZM11 -3V-2C12.1046 -2 13 -1.10457 13 0H14H15C15 -2.20914 13.2091 -4 11 -4V-3ZM14 0H13V2.75H14H15V0H14ZM14 8.25H13V11H14H15V8.25H14ZM14 11H13C13 12.1046 12.1046 13 11 13V14V15C13.2091 15 15 13.2091 15 11H14ZM11 14V13H8.25V14V15H11V14ZM2.75 14V13H0V14V15H2.75V14ZM0 14V13C-1.10457 13 -2 12.1046 -2 11H-3H-4C-4 13.2091 -2.20914 15 0 15V14ZM-3 11H-2V8.25H-3H-4V11H-3ZM-3 2.75H-2V0H-3H-4V2.75H-3ZM-3 0H-2C-2 -1.10457 -1.10457 -2 0 -2V-3V-4C-2.20914 -4 -4 -2.20914 -4 0H-3ZM0 -3V-2H2.75V-3V-4H0V-3ZM8.25 -3V-2H11V-3V-4H8.25V-3Z",fill:"#4E4E4E",mask:"url(#path-1-inside-1_2111_1511)"})),lO.createElement("g",{clipPath:"url(#clip2_2111_1511)"},lO.createElement("mask",{id:"path-3-inside-2_2111_1511",fill:"white"},lO.createElement("path",{d:"M3 14C1.34315 14 0 12.6569 0 11L0 0C0 -1.65685 1.34315 -3 3 -3H14C15.6569 -3 17 -1.65685 17 0V11C17 12.6569 15.6569 14 14 14H3Z"})),lO.createElement("path",{d:"M17 11H16.5C16.5 12.3807 15.3807 13.5 14 13.5V14V14.5C15.933 14.5 17.5 12.933 17.5 11H17ZM14 14V13.5H11.25V14V14.5H14V14ZM5.75 14V13.5H3V14V14.5H5.75V14ZM3 14V13.5C1.61929 13.5 0.5 12.3807 0.5 11H0H-0.5C-0.5 12.933 1.067 14.5 3 14.5V14ZM0 11H0.5L0.5 8.25H0H-0.5L-0.5 11H0ZM0 2.75H0.5L0.5 0H0H-0.5L-0.5 2.75H0ZM0 0H0.5C0.5 -1.38071 1.61929 -2.5 3 -2.5V-3V-3.5C1.067 -3.5 -0.5 -1.933 -0.5 0H0ZM3 -3V-2.5H5.75V-3V-3.5H3V-3ZM11.25 -3V-2.5H14V-3V-3.5H11.25V-3ZM14 -3V-2.5C15.3807 -2.5 16.5 -1.38071 16.5 0H17H17.5C17.5 -1.933 15.933 -3.5 14 -3.5V-3ZM17 0H16.5V2.75H17H17.5V0H17ZM17 8.25H16.5V11H17H17.5V8.25H17ZM17 11H16C16 12.1046 15.1046 13 14 13V14V15C16.2091 15 18 13.2091 18 11H17ZM14 14V13H11.25V14V15H14V14ZM5.75 14V13H3V14V15H5.75V14ZM3 14V13C1.89543 13 1 12.1046 1 11H0H-1C-1 13.2091 0.790861 15 3 15V14ZM0 11H1L1 8.25H0H-1L-1 11H0ZM0 2.75H1L1 0H0H-1L-1 2.75H0ZM0 0H1C1 -1.10457 1.89543 -2 3 -2V-3V-4C0.790861 -4 -1 -2.20914 -1 0H0ZM3 -3V-2H5.75V-3V-4H3V-3ZM11.25 -3V-2H14V-3V-4H11.25V-3ZM14 -3V-2C15.1046 -2 16 -1.10457 16 0H17H18C18 -2.20914 16.2091 -4 14 -4V-3ZM17 0H16V2.75H17H18V0H17ZM17 8.25H16V11H17H18V8.25H17Z",fill:"#4E4E4E",mask:"url(#path-3-inside-2_2111_1511)"})),lO.createElement("g",{clipPath:"url(#clip3_2111_1511)"},lO.createElement("mask",{id:"path-5-inside-3_2111_1511",fill:"white"},lO.createElement("path",{d:"M0 3C0 1.34315 1.34315 0 3 0H14C15.6569 0 17 1.34315 17 3V14C17 15.6569 15.6569 17 14 17H3C1.34315 17 0 15.6569 0 14V3Z"})),lO.createElement("path",{d:"M3 17V16.5C1.61929 16.5 0.5 15.3807 0.5 14H0H-0.5C-0.5 15.933 1.067 17.5 3 17.5V17ZM0 14H0.5V11.25H0H-0.5V14H0ZM0 5.75H0.5V3H0H-0.5V5.75H0ZM0 3H0.5C0.5 1.61929 1.61929 0.5 3 0.5V0V-0.5C1.067 -0.5 -0.5 1.067 -0.5 3H0ZM3 0V0.5H5.75V0V-0.5H3V0ZM11.25 0V0.5H14V0V-0.5H11.25V0ZM14 0V0.5C15.3807 0.5 16.5 1.61929 16.5 3H17H17.5C17.5 1.067 15.933 -0.5 14 -0.5V0ZM17 3H16.5V5.75H17H17.5V3H17ZM17 11.25H16.5V14H17H17.5V11.25H17ZM17 14H16.5C16.5 15.3807 15.3807 16.5 14 16.5V17V17.5C15.933 17.5 17.5 15.933 17.5 14H17ZM14 17V16.5H11.25V17V17.5H14V17ZM5.75 17V16.5H3V17V17.5H5.75V17ZM3 17V16C1.89543 16 1 15.1046 1 14H0H-1C-1 16.2091 0.790861 18 3 18V17ZM0 14H1V11.25H0H-1V14H0ZM0 5.75H1V3H0H-1V5.75H0ZM0 3H1C1 1.89543 1.89543 1 3 1V0V-1C0.790861 -1 -1 0.790861 -1 3H0ZM3 0V1H5.75V0V-1H3V0ZM11.25 0V1H14V0V-1H11.25V0ZM14 0V1C15.1046 1 16 1.89543 16 3H17H18C18 0.790861 16.2091 -1 14 -1V0ZM17 3H16V5.75H17H18V3H17ZM17 11.25H16V14H17H18V11.25H17ZM17 14H16C16 15.1046 15.1046 16 14 16V17V18C16.2091 18 18 16.2091 18 14H17ZM14 17V16H11.25V17V18H14V17ZM5.75 17V16H3V17V18H5.75V17Z",fill:"#4E4E4E",mask:"url(#path-5-inside-3_2111_1511)"})),lO.createElement("g",{clipPath:"url(#clip4_2111_1511)"},lO.createElement("mask",{id:"path-7-inside-4_2111_1511",fill:"white"},lO.createElement("path",{d:"M11 0C12.6569 0 14 1.34315 14 3V14C14 15.6569 12.6569 17 11 17H0C-1.65685 17 -3 15.6569 -3 14V3C-3 1.34315 -1.65685 0 0 0L11 0Z"})),lO.createElement("path",{d:"M-3 3H-2.5C-2.5 1.61929 -1.38071 0.5 0 0.5V0V-0.5C-1.933 -0.5 -3.5 1.067 -3.5 3H-3ZM0 0V0.5H2.75V0V-0.5H0V0ZM8.25 0V0.5L11 0.5V0V-0.5L8.25 -0.5V0ZM11 0V0.5C12.3807 0.5 13.5 1.61929 13.5 3H14H14.5C14.5 1.067 12.933 -0.5 11 -0.5V0ZM14 3H13.5V5.75H14H14.5V3H14ZM14 11.25H13.5V14H14H14.5V11.25H14ZM14 14H13.5C13.5 15.3807 12.3807 16.5 11 16.5V17V17.5C12.933 17.5 14.5 15.933 14.5 14H14ZM11 17V16.5H8.25V17V17.5H11V17ZM2.75 17V16.5H0V17V17.5H2.75V17ZM0 17V16.5C-1.38071 16.5 -2.5 15.3807 -2.5 14H-3H-3.5C-3.5 15.933 -1.933 17.5 0 17.5V17ZM-3 14H-2.5V11.25H-3H-3.5V14H-3ZM-3 5.75H-2.5V3H-3H-3.5V5.75H-3ZM-3 3H-2C-2 1.89543 -1.10457 1 0 1V0V-1C-2.20914 -1 -4 0.790861 -4 3H-3ZM0 0V1H2.75V0V-1H0V0ZM8.25 0V1L11 1V0V-1H8.25V0ZM11 0V1C12.1046 1 13 1.89543 13 3H14H15C15 0.790861 13.2091 -1 11 -1V0ZM14 3H13V5.75H14H15V3H14ZM14 11.25H13V14H14H15V11.25H14ZM14 14H13C13 15.1046 12.1046 16 11 16V17V18C13.2091 18 15 16.2091 15 14H14ZM11 17V16H8.25V17V18H11V17ZM2.75 17V16H0V17V18H2.75V17ZM0 17V16C-1.10457 16 -2 15.1046 -2 14H-3H-4C-4 16.2091 -2.20914 18 0 18V17ZM-3 14H-2V11.25H-3H-4V14H-3ZM-3 5.75H-2V3H-3H-4V5.75H-3Z",fill:"white",mask:"url(#path-7-inside-4_2111_1511)"}))),lO.createElement("defs",null,lO.createElement("clipPath",{id:"clip0_2111_1511"},lO.createElement("rect",{width:14,height:14,fill:"white"})),lO.createElement("clipPath",{id:"clip1_2111_1511"},lO.createElement("rect",{width:6,height:6,fill:"white",transform:"matrix(-1 0 0 -1 14 14)"})),lO.createElement("clipPath",{id:"clip2_2111_1511"},lO.createElement("rect",{width:6,height:6,fill:"white",transform:"matrix(0 -1 1 0 0 14)"})),lO.createElement("clipPath",{id:"clip3_2111_1511"},lO.createElement("rect",{width:6,height:6,fill:"white"})),lO.createElement("clipPath",{id:"clip4_2111_1511"},lO.createElement("rect",{width:6,height:6,fill:"white",transform:"matrix(0 1 -1 0 14 0)"})))),Tz=window.React.useCallback,Nz=window.React.useMemo,Lz=[{key:"top_left",label:"Top Left",icon:Mn.jsx(Oz,{})},{key:"top_right",label:"Top Right",icon:Mn.jsx(jz,{})},{key:"bottom_left",label:"Bottom left",icon:Mn.jsx(Rz,{})},{key:"bottom_right",label:"Bottom right",icon:Mn.jsx(Az,{})}],Iz=e=>{const{title:t,value_path:n,min:i,max:o}=e||{},r=n??"border_radius",a=eM((e=>{var t;return YE(null==(t=e.chosenElement)?void 0:t.data,r)})),s=eM((e=>e.updateChosenElementData)),l=Nz((()=>t??__("Border radius","yaymail")),[t]),c=Tz((e=>t=>{const n={...a};n[e]=t,s((e=>{ZE(e,r,n)}),{attribute:l})}),[s,a]);return Mn.jsxs("div",{className:"yaymail-editor-property yaymail-editor-property-border-radius",children:[Mn.jsx("div",{className:"yaymail-title",children:__(l)}),Mn.jsx(bn,{className:"yaymail-controls-container",children:null==Lz?void 0:Lz.map((({key:e,icon:t})=>Mn.jsx(Jp,{value:(null==a?void 0:a[e])||0,min:i??0,max:o??300,onChange:t=>c(e)(t),addonBefore:t},e)))})]})},Dz={refetchOnWindowFocus:!1,retry:!1,keepPreviousData:!0},Hz=async e=>await(async e=>{const{type:t,...n}=e,i="products"===t?"/product":`/product/${t}`;return await qR(i,{params:n})})(e.pageParam??e.queryKey[1]),Pz=window.React.useCallback,zz=window.React.useMemo,Fz=window.React.useState,Vz=({entity_type:e,title:t,value_path:n})=>{const[i,o]=Fz("");if(!n)return null;const r=zz((()=>n??""),[n]),{data:a,hasNextPage:s,fetchNextPage:l,isLoading:c,isFetching:u,isFetchingNextPage:d,isError:h}=(e=>{const t={...e,page_size:e.page_size||20};return n={...Dz,getNextPageParam:e=>e.data.next_page?{...t,page_num:e.data.next_page}:void 0},ak(iS(["featuredProductCriteriaEntities",t],Hz,n),BS);var n})({page_num:1,search_string:i,type:e}),p=zz((()=>null==a?void 0:a.pages.flatMap((e=>e.data.list))),[null==a?void 0:a.pages]),m=zz((()=>h?[]:null==p?void 0:p.map((e=>{var t;return Mn.jsx(Qt.Option,{value:e.id,children:Mn.jsx("span",{dangerouslySetInnerHTML:{__html:(null==(t=e.name)?void 0:t.toString())??""}})},e.id)}))),[a,h]),f=zz((()=>c||u||d),[c,u,d]),g=Pz((()=>{s&&!f&&l()}),[s,l,f]),y=P$((e=>(o(e),!0)),400),v=zz((()=>`${__("Select","yaymail")} ${t.toLowerCase()}`),[t]),b=eM((e=>{var t;return YE(null==(t=e.chosenElement)?void 0:t.data,r)})),w=Pz((e=>null==e?void 0:e.map((e=>{var t;return e?{value:e.id,label:Mn.jsx("span",{dangerouslySetInnerHTML:{__html:(null==(t=e.name)?void 0:t.toString())??""}}),key:e.id}:null})).filter((e=>null!==e))),[]),[x,C]=Fz(w(b??[])),_=eM((e=>e.updateChosenElementData)),S=Pz(P$((t=>{_((n=>{ZE(n,e,t)}),{attribute:__(`Featured product ${e}`)})}),500),[_,e]),k=Pz((e=>{if(!Array.isArray(e))return;const t=e.map((e=>b.concat(p??[]).find((t=>t.id===e))));C(w(t)),S(t)}),[_,p,b]),E=Pz((e=>{e||o("")}),[o]);return Mn.jsx(mH,{filterOption:!1,loading:f,mode:"multiple",onPopupScrollBottom:g,onSearch:y,placeholder:v,title:t,value:x,onChange:k,onDropdownVisibleChange:E,children:m})},Bz=window.React.useCallback,Wz=e=>{const{value_path:t,media_type:n,title:i,button_title:o,show_preview:r,show_delete_button:a,hide_preview_on_empty_url:s,url_input_placeholder:l}=e||{},c=t??"src",u=eM((e=>{var t;return YE(null==(t=e.chosenElement)?void 0:t.data,c)})),d=eM((e=>e.updateChosenElementData)),h=Bz((t=>{d((e=>{ZE(e,c,t)}),{attribute:(null==e?void 0:e.title)??__("Image src","yaymail")})}),[d,c]);return Mn.jsx(_H,{value:u,mediaUrlUpdateCallback:h,mediaType:n,buttonTitle:o,showPreview:r,title:i,showDeleteButton:a,hidePreviewOnEmptyUrl:s,urlInputPlaceHolder:l})},Uz=Object.freeze(Object.defineProperty({__proto__:null,Align:yH,BackgroundImage:TH,Border:eP,BorderRadius:Iz,CheckboxGroup:iP,Color:UH,ColumnWidth:sP,CopyColumn:pP,DatePicker:yP,Dimension:wP,EntitiesSelector:Vz,GridLayout:fH,GroupDefinition:xP,HookSelector:TP,ImageBox:dz,ImageList:pz,LineBreaker:LP,Media:Wz,NumberColumn:UP,NumberInput:zP,NumberInputBase:hH,RichTextEditor:BP,Selector:ZH,SelectorBase:mH,SocialList:vz,Spacing:qP,Switcher:XP,TextInput:SP,TextList:$z},Symbol.toStringTag,{value:"Module"})),Yz=window.React.useCallback,Zz=/\[yaymail_[^\]]*\]/,Gz=/\[(yaymail_[_\w:]+)[\s\]]/,qz=/([^= ]+)=("[^"]*")/g;function Kz(e){const t=e.match(Gz);return t&&t[1]||null}function Qz(e){const t=e.match(qz);return null==t?{}:t.filter(Xz).map(Jz).reduce(((e,t)=>({...e,...t})),{})}function Xz(e){return!0}function Jz(e){const t=e.match(/([^\s]*)="/),n=e.match(/"([^"]*)"/);return{[t&&t[1]||""]:n&&n[1]||""}}function eF(){const e=hM((e=>e.shortcodes));return{doShortcode:Yz((t=>{if(!t)return"";const n=t.match(new RegExp(Zz,"g"));return null==n||n.forEach((n=>{const i=function(e){return{name:Kz(e),attributes:Qz(e)}}(n),o=(e??[]).find((e=>i.name===e.name));if(o){let e=o.content;const r=i.attributes;Array.isArray(r)||("true"===(null==r?void 0:r.is_plain)&&(e=e.replace(/]*>(.*?)<\/a>/gi,"$1")),e=GE(e,r)),t=t.replaceAll(n,e)}})),t}),[e])}}Qk(!1);const tF=lE()(nE(eE(iE(((e,t)=>({addonComponents:[],addonCustomPropertyEditors:[],registerElement:(t,n)=>{e((e=>{e.addonComponents.push({type:t,component:n})}))},registerAddonCustomPropertyEditor:(t,n)=>{e((e=>{e.addonCustomPropertyEditors.push({name:t,component:n})}))}}))))),oE),nF=window.React.useMemo,iF=bH((({element:e})=>{const t=e.data,{doShortcode:n}=eF(),i=nF((()=>({paddingTop:y$(t.padding.top),paddingRight:y$(t.padding.right),paddingBottom:y$(t.padding.bottom),paddingLeft:y$(t.padding.left),backgroundColor:t.background_color||"transparent",fontFamily:t.font_family??"initial"})),[t]),o=nF((()=>({color:t.text_color??ix.color.black[700],padding:y$(12),border:`1px solid ${t.border_color??"#e5e5e5"}`})),[t.text_color,y$,t.border_color]),r=nF((()=>({color:t.title_color??ix.color.black[700],margin:"0 0 7px 0",fontSize:y$(20),fontWeight:600})),[t.title_color,y$]),a=nF((()=>n(t.title??"")),[t.title,n]),s=nF((()=>n(t.rich_text??"")),[t.rich_text,n]),l=nF((()=>"modern"===t.layout_type),[t.layout_type]),c=nF((()=>({...l?{"data-layout-type-modern":!0}:{}})),[l]),u=nF((()=>`\n [data-yaymail-element-id="${e.id}"] .yaymail-billing-address-wrap[data-layout-type-modern] {\n border: 0 !important;\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n `),[e.id]);return Mn.jsxs(uH,{className:"yaymail-customizer-element-billing-address",element:e,style:i,children:[Mn.jsx("style",{children:u}),Mn.jsx("div",{className:"yaymail-billing-title",style:r,dangerouslySetInnerHTML:{__html:a}}),s?Mn.jsx("div",{className:"yaymail-billing-address-wrap",style:o,dangerouslySetInnerHTML:{__html:s},...c}):Mn.jsx("div",{className:"yaymail-billing-address-wrap",style:o,...c,children:Mn.jsx("address",{children:__("No Billing address set.","yaymail")})})]})})),oF=window.React.memo,rF=window.React.useMemo,aF=bH((({element:e})=>{const t=e.data,{doShortcode:n}=eF(),i=rF((()=>({paddingTop:UE(t.padding.top),paddingRight:UE(t.padding.right),paddingBottom:UE(t.padding.bottom),paddingLeft:UE(t.padding.left),backgroundColor:t.background_color||"transparent",fontFamily:t.font_family??"initial"})),[t]),o=rF((()=>n(t.billing_title??"")),[t.billing_title,n]),r=rF((()=>n(t.shipping_title??"")),[t.shipping_title,n]),a=rF((()=>n(t.billing_address_content??"")),[t.billing_address_content,n]),s=rF((()=>n(t.shipping_address_content??"")),[t.shipping_address_content,n]),l=rF((()=>__("No Billing address set.","yaymail")),[]),c=rF((()=>__("No Billing address set.","yaymail")),[]),u=rF((()=>"modern"===t.layout_type),[t.layout_type]),d=rF((()=>({...u?{"data-layout-type-modern":!0}:{}})),[u]),h=rF((()=>`\n [data-yaymail-element-id="${e.id}"] .yaymail-table-billing-shipping-address[data-layout-type-modern] .yaymail-billing-address-wrap,\n [data-yaymail-element-id="${e.id}"] .yaymail-table-billing-shipping-address[data-layout-type-modern] .yaymail-shipping-address-wrap {\n border: 0 !important;\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n `),[e.id]);return Mn.jsxs(uH,{className:"yaymail-customizer-element-billing-shipping-address",element:e,style:i,children:[Mn.jsx("style",{children:h}),Mn.jsx("table",{className:"yaymail-table-billing-shipping-address",style:{borderSpacing:"5px"},...d,children:Mn.jsx("tbody",{children:Mn.jsxs("tr",{children:[Mn.jsx(sF,{title:o,content:a,titleColor:t.title_color,textColor:t.text_color,borderColor:t.border_color,emptyContent:l,isBilling:!0}),Mn.jsx(sF,{title:r,content:s,titleColor:t.title_color,textColor:t.text_color,borderColor:t.border_color,emptyContent:c,isBilling:!1})]})})})]})})),sF=oF((e=>{const t=rF((()=>({color:e.titleColor??ix.color.black[700],padding:UE(0),margin:"0 0 7px 0"})),[e.titleColor]),n=rF((()=>({borderWidth:1,borderStyle:"solid",borderColor:e.borderColor??"#e5e5e5",color:e.textColor??ix.color.black[700],padding:UE(12)})),[e.borderColor,e.textColor]);return Mn.jsx("td",{style:{width:"50%",verticalAlign:"top"},className:`yaymail-${e.isBilling?"billing":"shipping"}-address-column`,children:Mn.jsx("table",{cellPadding:"0",cellSpacing:"0",width:"100%",style:{borderSpacing:0},children:Mn.jsxs("tbody",{children:[Mn.jsx("tr",{children:Mn.jsx("td",{children:Mn.jsx("div",{className:e.isBilling?"yaymail-billing-title":"yaymail-shipping-title",style:t,dangerouslySetInnerHTML:{__html:e.title??"Address"}})})}),Mn.jsx("tr",{children:Mn.jsx("td",{children:Mn.jsx("table",{cellPadding:"0",cellSpacing:"0",width:"100%",style:{borderSpacing:0},children:Mn.jsx("tbody",{children:Mn.jsx("tr",{children:Mn.jsx("td",{className:e.isBilling?"yaymail-billing-address-wrap":"yaymail-shipping-address-wrap",style:n,children:e.content?Mn.jsx("div",{dangerouslySetInnerHTML:{__html:e.content}}):Mn.jsx("div",{children:Mn.jsx("address",{children:e.emptyContent??"No Address set."})})})})})})})})]})})})})),lF=window.React.useMemo,cF=bH((({element:e})=>{const t=e.data,n=t.align,i=void 0!==t.button_padding?t.button_padding:{top:"12",right:"20",bottom:"12",left:"20"},{doShortcode:o}=eF(),r=lF((()=>({textAlign:"center",backgroundColor:t.background_color||"transparent"})),[t.background_color]),a=lF((()=>({paddingTop:y$(t.padding.top),paddingRight:y$(t.padding.right),paddingBottom:y$(t.padding.bottom),paddingLeft:y$(t.padding.left),width:y$(t.width,"%"),margin:"center"===n?"0 auto":"auto",float:"left"===n||"right"===n?n:"unset"})),[e.data.padding,e.data.width,n]),s=lF((()=>({display:"inline-block",width:"100%",borderTopLeftRadius:y$(t.border_radius.top_left??0),borderTopRightRadius:y$(t.border_radius.top_right??0),borderBottomRightRadius:y$(t.border_radius.bottom_right??0),borderBottomLeftRadius:y$(t.border_radius.bottom_left??0),backgroundColor:t.button_background_color||ix.color.wcPurple.default,...KE(t.border)})),[t.border_radius,t.button_background_color,t.border]),l=lF((()=>({display:"block",fontFamily:t.font_family??"initial",lineHeight:y$(t.height??21),color:t.text_color||ix.color.white,fontSize:y$(t.font_size??13),fontWeight:t.weight||"inherit",paddingTop:y$(i.top),paddingRight:y$(i.right),paddingBottom:y$(i.bottom),paddingLeft:y$(i.left)})),[t.font_family,t.height,t.text_color,t.font_size,t.weight,i]),c=lF((()=>o(t.text??"")),[t.text,o]),u=lF((()=>o(t.url??"")),[t.url,o]);return Mn.jsx(uH,{className:"yaymail-customizer-element-button",element:e,style:r,children:Mn.jsx("table",{className:"yaymail-element-button",style:a,align:n,children:Mn.jsx("tbody",{children:Mn.jsx("tr",{children:Mn.jsx("td",{style:{padding:0},children:Mn.jsx("div",{style:s,children:Mn.jsx("a",{className:"yaymail-customizer-element-button__anchor",href:u,target:"_blank",rel:"noreferrer",children:Mn.jsx("span",{style:l,children:c})})})})})})})})}));Qk(!1);const uF=ix.customizer.percentColumnMinWidth,dF=lE()(nE(eE(iE(((e,t)=>({isResizing:!1,startX:null,rightColumnIndex:null,resizingColumns:null,startResizing:(t,n)=>e((e=>{var i;e.isResizing=!0,e.startX=t,e.rightColumnIndex=n,e.resizingColumns=null==(i=eM.getState().chosenElement)?void 0:i.children})),stopResizing:()=>e((e=>{e.isResizing=!1,e.startX=null,e.rightColumnIndex=null,e.resizingColumns=null})),resize:t=>{e((e=>{var n,i,o;if(!e.resizingColumns||!e.startX||!e.rightColumnIndex||e.rightColumnIndex<=0||e.rightColumnIndex>=e.resizingColumns.length)return;const r=100-5*(e.resizingColumns.length-1),a=t-e.startX,s=null==(n=e.resizingColumns[e.rightColumnIndex-1])?void 0:n.data,l=null==(i=e.resizingColumns[e.rightColumnIndex])?void 0:i.data,c=(null==s?void 0:s.width)??uF,u=(null==l?void 0:l.width)??uF;let d=a/(Number(null==(o=cE.getState().settings)?void 0:o.container_width)-10)*100;d=vE(d);const h=Math.min(r,Math.max(uF,c+d)),p=Math.min(r,Math.max(uF,u-d));h<=uF||p<=uF||eM.getState().updateChosenElementChildren((t=>{t&&(t[e.rightColumnIndex-1].data.width=vE(h),t[e.rightColumnIndex].data.width=vE(p))}),{attribute:__("Width","yaymail")})}))}}))))),oE),hF=window.React.memo,pF=window.React.useCallback,mF=window.React.useMemo,fF=hF((({children:e,columnIndex:t,parentId:n,list:i=[],width:o})=>{var r;const a=eM((e=>e.list)),s=eM((e=>e.updateList)),l=mF((()=>Boolean(e&&i.length>0)),[e,i]),c=dF((e=>e.startResizing)),u=pF((e=>{c(e.clientX,t)}),[t]),d=mF((()=>s$(n??"",a)),[a,n]),h=mF((()=>{var e;return(null==(e=null==d?void 0:d.data)?void 0:e.column_spacing)??0}),[d]),p=mF((()=>{var e;return(null==(e=null==d?void 0:d.data)?void 0:e.amount_of_columns)??0}),[null==(r=null==d?void 0:d.data)?void 0:r.amount_of_columns]),m=mF((()=>({width:o+"%",maxWidth:o+"%",verticalAlign:"top",...0===t?{paddingLeft:"0",paddingRight:UE(h/2)}:{paddingRight:UE(h/4),paddingLeft:UE(h/4)},...p-1===t?{paddingRight:"0",paddingLeft:UE(h/2)}:{}})),[o,p,t,h]);return Mn.jsxs("td",{style:m,className:"yaymail-customizer-element-column",children:[t>0&&Mn.jsx("div",{className:"yaymail-resize-handle",onMouseDown:u}),Mn.jsx(YT,{list:i,setList:s,className:o$,parentList:a,parentId:n,columnIndex:t,style:l?{border:"none"}:{},children:e})]})})),gF=window.React.useCallback,yF=window.React.useMemo,vF=({children:e,element:t})=>{var n;const i=t.data,o=null==(n=null==i?void 0:i.background_image)?void 0:n.url,r=yF((()=>{var e,t,n;const o=null==(e=null==i?void 0:i.background_image)?void 0:e.position;return o&&"default"!==o?"custom"===o?`${(null==(t=i.background_image)?void 0:t.x_position)??0}% ${(null==(n=i.background_image)?void 0:n.y_position)??0}%`:yE(o):"unset"}),[i.background_image]),a=yF((()=>{var e;const t=null==(e=i.background_image)?void 0:e.repeat;return t&&"default"!==t?t:"unset"}),[i.background_image]),s=yF((()=>{var e,t;const n=null==(e=i.background_image)?void 0:e.size;return n&&"default"!==n?"custom"===n?`${(null==(t=i.background_image)?void 0:t.custom_size)??100}%`:n:"unset"}),[i.background_image]),l=yF((()=>{var e,t,n,l,c,u,d,h;return{paddingTop:UE(null==(e=i.padding)?void 0:e.top),paddingRight:UE(null==(t=i.padding)?void 0:t.right),paddingBottom:UE(null==(n=i.padding)?void 0:n.bottom),paddingLeft:UE(null==(l=i.padding)?void 0:l.left),backgroundColor:i.background_color||"transparent",borderTopLeftRadius:UE((null==(c=i.border_radius)?void 0:c.top_left)??0),borderTopRightRadius:UE((null==(u=i.border_radius)?void 0:u.top_right)??0),borderBottomLeftRadius:UE((null==(d=i.border_radius)?void 0:d.bottom_left)??0),borderBottomRightRadius:UE((null==(h=i.border_radius)?void 0:h.bottom_right)??0),overflow:"hidden",...o?{backgroundImage:`url(${o})`,backgroundPosition:r,backgroundRepeat:a,backgroundSize:s}:{}}}),[t.data.padding,t.data.border_radius,t.data.background_color,t.data.background_image,o]),c=yF((()=>{var e,t,n,o;return{borderTopLeftRadius:UE((null==(e=i.inner_border_radius)?void 0:e.top_left)??0),borderTopRightRadius:UE((null==(t=i.inner_border_radius)?void 0:t.top_right)??0),borderBottomLeftRadius:UE((null==(n=i.inner_border_radius)?void 0:n.bottom_left)??0),borderBottomRightRadius:UE((null==(o=i.inner_border_radius)?void 0:o.bottom_right)??0),backgroundColor:i.inner_background_color??"#fff",overflow:"hidden"}}),[i.inner_border_radius,i.inner_background_color]),u=dF((e=>e.stopResizing)),d=dF((e=>e.resize)),h=gF(P$((e=>{d(e.clientX)}),0),[d]);return Mn.jsx(uH,{element:t,className:"yaymail-customizer-element-column_layout",style:l,onMouseMove:h,onMouseUp:u,children:Mn.jsx("div",{className:"yaymail-inner-customizer-element-column",style:c,children:Mn.jsx("table",{style:{width:"100%",backgroundColor:"inherit"},cellPadding:0,cellSpacing:0,children:Mn.jsx("tbody",{children:Mn.jsx("tr",{children:e})})})})})},bF=window.React.useMemo,wF=bH((({element:e})=>{const t=e.data,n=bF((()=>({paddingTop:y$(t.padding.top),paddingRight:y$(t.padding.right),paddingBottom:y$(t.padding.bottom),paddingLeft:y$(t.padding.left),backgroundColor:t.background_color||"transparent"})),[t.background_color,t.padding]),i=bF((()=>{const e="center"===t.align?"0 auto":"right"===t.align?"0 0 0 auto":"0";return{width:y$(t.width??100,"%"),borderTopWidth:y$(t.height??6),borderTopColor:t.divider_color||"#333",borderTopStyle:t.divider_type||"solid",padding:0,margin:e,lineHeight:0}}),[t]),o=bF((()=>({borderCollapse:"collapse",width:y$(t.width??100,"%"),margin:"center"===t.align?"0 auto":"right"===t.align?"0 0 0 auto":"0"})),[t]);return Mn.jsx(uH,{className:"yaymail-customizer-element-divider",element:e,style:n,children:Mn.jsx("table",{cellPadding:"0",cellSpacing:"0",role:"presentation",style:o,children:Mn.jsx("tbody",{children:Mn.jsx("tr",{children:Mn.jsx("td",{style:i,children:" "})})})})})})),xF=window.React.useMemo,CF=bH((({element:e})=>{const t=e.data,n=hM((t=>t.globalHeaderFooter.globalFooterElements.find((t=>t.id===e.id)))),i=hM((e=>{var t;return null==(t=e.templateData)?void 0:t.global_footer_settings})),o=cE((e=>{var t;return null==(t=e.settings)?void 0:t.global_header_footer_enabled})),r=xF((()=>o&&n&&(null==i?void 0:i.content_override)?null==i?void 0:i.footer_content:t.rich_text),[n,i,t.rich_text,o]),{doShortcode:a}=eF(),s=xF((()=>({paddingTop:y$(t.padding.top),paddingRight:y$(t.padding.right),paddingBottom:y$(t.padding.bottom),paddingLeft:y$(t.padding.left),backgroundColor:t.background_color})),[t.padding,t.background_color]),l=xF((()=>({fontFamily:t.font_family??"initial",color:t.text_color??ix.color.black[700]})),[t.font_family,t.text_color]),c=xF((()=>a(r)??""),[r,a]);return Mn.jsx(uH,{className:"yaymail-customizer-element-footer",element:e,style:s,children:Mn.jsx("div",{style:l,dangerouslySetInnerHTML:{__html:c}})})})),_F=window.React.useMemo,SF=bH((({element:e})=>{const t=e.data,{doShortcode:n}=eF(),i=hM((t=>t.globalHeaderFooter.globalHeaderElements.find((t=>t.id===e.id)))),o=hM((e=>{var t;return null==(t=e.templateData)?void 0:t.global_header_settings})),r=cE((e=>{var t;return null==(t=e.settings)?void 0:t.global_header_footer_enabled})),a=_F((()=>r&&i&&(null==o?void 0:o.content_override)?null==o?void 0:o.heading_content:t.rich_text),[i,o,t.rich_text,r]),s=_F((()=>({paddingTop:UE(t.padding.top??15),paddingRight:UE(t.padding.right??50),paddingBottom:UE(t.padding.bottom??15),paddingLeft:UE(t.padding.left??50),backgroundColor:t.background_color||"transparent"})),[t]),l=_F((()=>({fontFamily:t.font_family??"initial",color:t.text_color??ix.color.white})),[t.font_family,t.text_color]),c=_F((()=>n(a)??""),[a,n]);return Mn.jsx(uH,{className:"yaymail-customizer-element-heading",element:e,style:s,children:Mn.jsx("div",{style:l,dangerouslySetInnerHTML:{__html:c}})})})),kF=window.React.useCallback,EF=window.React.useContext,$F=window.React.useEffect,MF=window.React.useMemo,RF=window.React.useState,AF=bH((({element:e})=>{const t=e.data,{selectedOrderID:n}=EF(hA),i=hM((e=>e.templateData)),o=MF((()=>({paddingTop:UE(t.padding.top),paddingRight:UE(t.padding.right),paddingBottom:UE(t.padding.bottom),paddingLeft:UE(t.padding.left),backgroundColor:t.background_color||"transparent"})),[t]),[r,a]=RF(!1),s=MF((()=>({fontFamily:t.font_family||"initial",color:t.text_color||ix.color.black[700]})),[t.font_family,t.text_color,r]),[l,c]=RF(""),u=kF(P$((async e=>{const t=Qz(e);var o;if(Object.keys(t).some((e=>"hook"===e)))try{const r=(o={template_data:i,order_id:n,attributes:t},pE=window.jQuery.ajax({type:"POST",url:window.yaymailData.admin_ajax.url,data:{action:"yaymail_get_custom_hook_html",nonce:window.yaymailData.admin_ajax.nonce,data:o}}),pE);a(!0);const s=await r.promise();a(!1),c(s.data.html||e)}catch(r){c(e)}}),400),[n,i]);return $F((()=>{u(t.hook_shortcode)}),[t.hook_shortcode,n,u]),Mn.jsx(uH,{className:"yaymail-customizer-element-hook",element:e,style:o,children:r?Mn.jsx("div",{style:{...s,textAlign:"center"},children:Mn.jsx(Sn,{})}):Mn.jsx("div",{style:s,dangerouslySetInnerHTML:{__html:l}})})})),OF=window.React.useMemo,jF=bH((({element:e})=>{const t=e.data,{doShortcode:n}=eF(),i=OF((()=>t.rich_text),[t.rich_text]),o=OF((()=>({textAlign:i.length>0?"unset":"center"})),[i]),r=OF((()=>n(i??"")),[i,n]);return Mn.jsx(uH,{className:"yaymail-customizer-element-html",element:e,style:o,children:i.length>0?Mn.jsx("div",{dangerouslySetInnerHTML:{__html:r}}):Mn.jsx(tI,{style:{color:"#c2cbd2",fontSize:"22px"}})})})),TF=window.React.useMemo,NF=bH((({element:e})=>{const t=e.data,n=TF((()=>({textAlign:t.align??"center",paddingTop:y$(t.padding.top),paddingRight:y$(t.padding.right),paddingBottom:y$(t.padding.bottom),paddingLeft:y$(t.padding.left),backgroundColor:t.background_color||"transparent"})),[t]),i=TF((()=>({width:y$(t.width??172)})),[t.width]);return Mn.jsx(uH,{className:"yaymail-customizer-element-image",element:e,style:n,children:Mn.jsx("a",{className:"yaymail-customizer-element-image__anchor",href:t.url,target:"_blank",rel:"noreferrer",children:Mn.jsx("img",{src:t.src,style:i,alt:t.alt??""})})})})),LF=window.React.useMemo,IF=window.React.useState,DF=bH((({element:e})=>{var t;const n=e.data,{doShortcode:i}=eF(),o=LF((()=>({backgroundColor:n.background_color||"transparent"})),[n.background_color]),r=LF((()=>{var e,t,i,o;return{paddingTop:y$(null==(e=n.image_box.column_1)?void 0:e.padding.value.top),paddingRight:y$(null==(t=n.image_box.column_1)?void 0:t.padding.value.right),paddingBottom:y$(null==(i=n.image_box.column_1)?void 0:i.padding.value.bottom),paddingLeft:y$(null==(o=n.image_box.column_1)?void 0:o.padding.value.left)}}),[n.image_box.column_1.padding.value]),a=LF((()=>{var e,t,i,o;return{paddingTop:y$(null==(e=n.image_box.column_2)?void 0:e.padding.value.top),paddingRight:y$(null==(t=n.image_box.column_2)?void 0:t.padding.value.right),paddingBottom:y$(null==(i=n.image_box.column_2)?void 0:i.padding.value.bottom),paddingLeft:y$(null==(o=n.image_box.column_2)?void 0:o.padding.value.left)}}),[n.image_box.column_2.padding.value]),s=LF((()=>({width:y$(n.image_box.column_1.width.value)})),[n.image_box.column_1.width.value]),l=LF((()=>({fontFamily:n.image_box.column_2.font_family.value??"initial",color:n.text_color??ix.color.black[700]})),[n.image_box.column_2.font_family.value,n.text_color]),c=LF((()=>i(n.image_box.column_2.rich_text.value)),[n.image_box.column_2.rich_text.value,i]),[u,d]=IF(null),h=e=>{ez("onYayMailImageBoxColumnSelected",e),d(e)};return Mn.jsx(uH,{className:"yaymail-customizer-element-image-box",element:e,style:o,children:Mn.jsx("table",{className:"yaymail-table-image-box",children:Mn.jsx("tbody",{children:Mn.jsxs("tr",{children:[Mn.jsx("td",{onClick:()=>h("column_1"),align:n.image_box.column_1.align.value,style:r,className:"yaymail-table-image-box-column "+("column_1"===u?"active":""),children:Mn.jsx("div",{children:Mn.jsx("a",{className:"yaymail-customizer-element-image-box__anchor",href:n.image_box.column_1.url.value,target:"_blank",rel:"noreferrer",children:Mn.jsx("img",{style:s,src:n.image_box.column_1.image.value,alt:(null==(t=n.image_box.column_1.alt)?void 0:t.value)??""})})})}),Mn.jsx("td",{onClick:()=>h("column_2"),style:a,className:"yaymail-table-image-box-column "+("column_2"===u?"active":""),children:Mn.jsx("div",{style:l,dangerouslySetInnerHTML:{__html:c}})})]})})})})})),HF=window.React.useCallback,PF=window.React.useMemo,zF=bH((({element:e})=>{var t,n,i;const o=PF((()=>+e.data.number_column),[e.data.number_column]),r=PF((()=>100/o),[o]),a=PF((()=>({backgroundColor:e.data.background_color||"transparent"})),[e.data.background_color]),s=PF((()=>{var t,n,i,o,r;return{paddingTop:UE((null==(t=e.data.image_list.column_1)?void 0:t.padding.value.top)??0),paddingRight:UE((null==(n=e.data.image_list.column_1)?void 0:n.padding.value.right)??0),paddingBottom:UE((null==(i=e.data.image_list.column_1)?void 0:i.padding.value.bottom)??0),paddingLeft:UE((null==(o=e.data.image_list.column_1)?void 0:o.padding.value.left)??0),textAlign:(null==(r=e.data.image_list.column_1)?void 0:r.align.value)||"center"}}),[e.data.image_list.column_1.padding.value,e.data.image_list.column_1.align.value]),l=PF((()=>{var t,n,i,o,r;return{paddingTop:UE((null==(t=e.data.image_list.column_2)?void 0:t.padding.value.top)??0),paddingRight:UE((null==(n=e.data.image_list.column_2)?void 0:n.padding.value.right)??0),paddingBottom:UE((null==(i=e.data.image_list.column_2)?void 0:i.padding.value.bottom)??0),paddingLeft:UE((null==(o=e.data.image_list.column_2)?void 0:o.padding.value.left)??0),textAlign:(null==(r=e.data.image_list.column_2)?void 0:r.align.value)||"center"}}),[e.data.image_list.column_2.padding.value,e.data.image_list.column_2.align.value]),c=PF((()=>{var t,n,i,o,r;return{paddingTop:UE((null==(t=e.data.image_list.column_3)?void 0:t.padding.value.top)??0),paddingRight:UE((null==(n=e.data.image_list.column_3)?void 0:n.padding.value.right)??0),paddingBottom:UE((null==(i=e.data.image_list.column_3)?void 0:i.padding.value.bottom)??0),paddingLeft:UE((null==(o=e.data.image_list.column_3)?void 0:o.padding.value.left)??0),textAlign:(null==(r=e.data.image_list.column_3)?void 0:r.align.value)||"center"}}),[e.data.image_list.column_3.padding.value,e.data.image_list.column_3.align.value]),u=PF((()=>{var t;return{width:UE((null==(t=e.data.image_list.column_1)?void 0:t.width.value)??100)}}),[e.data.image_list.column_1.width.value]),d=PF((()=>{var t;return{width:UE((null==(t=e.data.image_list.column_2)?void 0:t.width.value)??100)}}),[e.data.image_list.column_2.width.value]),h=PF((()=>{var t;return{width:UE((null==(t=e.data.image_list.column_3)?void 0:t.width.value)??100)}}),[e.data.image_list.column_3.width.value]),p=hz((e=>e.selectColumn)),m=hz((e=>e.selectedColumn)),f=HF((e=>{p(e)}),[p]);return Mn.jsx(Mn.Fragment,{children:Mn.jsx(uH,{className:"yaymail-customizer-element-image-list",element:e,style:a,children:Mn.jsx("table",{className:"yaymail-table-image-list",style:{width:"100%",tableLayout:"fixed"},children:Mn.jsx("tbody",{children:Mn.jsxs("tr",{children:[Mn.jsx("td",{onClick:()=>f(1),valign:"top",style:{width:UE(r,"%"),boxSizing:"border-box"},"data-column":"1",className:"yaymail-table-image-list-column "+(1===m?"active":""),children:Mn.jsx("table",{style:{width:"100%",tableLayout:"fixed"},children:Mn.jsx("tbody",{children:Mn.jsx("tr",{children:Mn.jsx("td",{style:s,children:Mn.jsx("a",{className:"yaymail-customizer-element-image-list__anchor",href:e.data.image_list.column_1.url.value,target:"_blank",rel:"noreferrer",children:Mn.jsx("img",{style:{...u,display:"inline-block",maxWidth:"100%",height:"auto"},src:e.data.image_list.column_1.image.value,alt:(null==(t=e.data.image_list.column_1.alt)?void 0:t.value)??""})})})})})})}),o>1&&Mn.jsx("td",{onClick:()=>f(2),valign:"top","data-column":"2",style:{width:UE(r,"%"),boxSizing:"border-box"},className:"yaymail-table-image-list-column "+(2===m?"active":""),children:Mn.jsx("table",{style:{width:"100%",tableLayout:"fixed"},children:Mn.jsx("tbody",{children:Mn.jsx("tr",{children:Mn.jsx("td",{style:l,children:Mn.jsx("a",{className:"yaymail-customizer-element-image-list__anchor",href:e.data.image_list.column_2.url.value,target:"_blank",rel:"noreferrer",children:Mn.jsx("img",{style:{...d,display:"inline-block",maxWidth:"100%",height:"auto"},src:e.data.image_list.column_2.image.value,alt:(null==(n=e.data.image_list.column_2.alt)?void 0:n.value)??""})})})})})})}),3===o&&Mn.jsx("td",{onClick:()=>f(3),valign:"top","data-column":"3",style:{width:UE(r,"%"),boxSizing:"border-box"},className:"yaymail-table-image-list-column "+(3===m?"active":""),children:Mn.jsx("table",{style:{width:"100%",tableLayout:"fixed"},children:Mn.jsx("tbody",{children:Mn.jsx("tr",{children:Mn.jsx("td",{style:c,children:Mn.jsx("a",{className:"yaymail-customizer-element-image-list__anchor",href:e.data.image_list.column_3.url.value,target:"_blank",rel:"noreferrer",children:Mn.jsx("img",{style:{...h,display:"inline-block",maxWidth:"100%",height:"auto"},src:e.data.image_list.column_3.image.value,alt:(null==(i=e.data.image_list.column_3.alt)?void 0:i.value)??""})})})})})})})]})})})})})})),FF=window.React.useMemo,VF=bH((({element:e})=>{const t=e.data,n=FF((()=>({textAlign:t.align??"center",paddingTop:UE(t.padding.top??0),paddingRight:UE(t.padding.right??0),paddingBottom:UE(t.padding.bottom??0),paddingLeft:UE(t.padding.left??0),backgroundColor:t.background_color||"transparent"})),[t]),i=FF((()=>({width:UE(t.width)??172})),[t.width]);return Mn.jsx(uH,{className:"yaymail-customizer-element-logo",element:e,style:n,children:Mn.jsx("a",{className:"yaymail-customizer-element-logo__anchor",href:t.url,target:"_blank",rel:"noreferrer",children:Mn.jsx("img",{src:t.src,style:i,alt:t.alt??""})})})})),BF=window.React.useMemo,WF=bH((({element:e})=>{const t=e.data,n=cE((e=>e.settings)),i=fO(),{doShortcode:o}=eF(),r=BF((()=>({paddingTop:UE(t.padding.top),paddingRight:UE(t.padding.right),paddingBottom:UE(t.padding.bottom),paddingLeft:UE(t.padding.left),backgroundColor:t.background_color||"transparent",fontFamily:t.font_family??"initial"})),[t.padding,t.background_color,t.font_family]),a=BF((()=>({color:t.text_color??ix.color.black[700],border:`1px solid ${t.border_color??"#e5e5e5"}`,width:"100%"})),[t.text_color,t.border_color,UE]),s=BF((()=>({color:t.title_color??ix.color.black[700],marginTop:UE(0),fontFamily:t.font_family??"initial",marginBottom:UE(7)})),[t.title_color,t.font_family,UE]),l=BF((()=>o(t.title??"")),[t.title,o]),c=BF((()=>o(t.rich_text??"")),[t.rich_text,o]),u=BF((()=>({product_title:t.product_title,cost_title:t.cost_title,price_title:t.price_title,quantity_title:t.quantity_title,cart_subtotal_title:t.cart_subtotal_title,discount_title:t.discount_title,payment_method_title:t.payment_method_title,order_total_title:t.order_total_title,order_note_title:t.order_note_title,shipping_title:t.shipping_title})),[t.product_title,t.cost_title,t.price_title,t.quantity_title,t.cart_subtotal_title,t.discount_title,t.payment_method_title,t.order_total_title,t.order_note_title,t.shipping_title]),d=BF((()=>{let e=c;return"rtl"===i&&(e=e.replaceAll(/text-align:left/g,"text-align:right")),"ltr"===i&&(e=e.replaceAll(/text-align:right/g,"text-align:left")),GE(e,{...u,...n})}),[c,u,n,i]),h=BF((()=>(null==n?void 0:n.show_product_image)??!1),[null==n?void 0:n.show_product_image]),p=BF((()=>(null==n?void 0:n.product_image_position)??"top"),[null==n?void 0:n.product_image_position]),m=BF((()=>(null==n?void 0:n.show_product_description)??!1),[null==n?void 0:n.show_product_description]),f=BF((()=>(null==n?void 0:n.show_product_sku)??!1),[null==n?void 0:n.show_product_sku]),g=BF((()=>(null==n?void 0:n.show_product_hyper_links)??!1),[null==n?void 0:n.show_product_hyper_links]),y=BF((()=>(null==n?void 0:n.show_product_regular_price)??!1),[null==n?void 0:n.show_product_regular_price]),v=BF((()=>(null==n?void 0:n.show_product_item_cost)??!1),[null==n?void 0:n.show_product_item_cost]),b=BF((()=>"modern"===t.layout_type),[t.layout_type]),w=BF((()=>!1!==t.show_table_header),[t.show_table_header]),x=BF((()=>({...h?{"product-image-position":"rtl"===i&&"left"===p?"right":p}:{},...m?{"data-show-product-description":!0}:{},...f?{"data-show-product-sku":!0}:{},...g?{"data-show-product-hyper-link":!0}:{},...y?{"data-show-product-regular-price":!0}:{},...v?{"data-show-product-item-cost":!0}:{},...b?{"data-layout-type-modern":!0}:{},...w?{"data-show-table-header":!0}:{"data-show-table-header":!1}})),[h,p,m,f,g,y,v,b,w,i]),C=BF((()=>`\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern]{\n border: 0 !important;\n }\n\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] th,\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] td {\n border: 0 !important;\n padding-left: 0 !important;\n padding-right: 0 !important;\n \n }\n\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] .yaymail_item_price_title,\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] .yaymail_item_price_content,\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] .yaymail_element_foot_order_details tr td {\n text-align: right !important;\n }\n\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] .yaymail_item_quantity_title,\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] .yaymail_item_quantity_content,\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] .yaymail_item_cost_title,\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] .yaymail_item_cost_content {\n text-align: center !important;\n }\n\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] .yaymail-quantity-type-modern {\n display: inline-block;\n }\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-show-table-header='false'] .yaymail_element_head_order_details {\n display: none !important;\n }\n\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] .order_item:last-child td {\n border-bottom: 1px solid ${t.border_color??"#e5e5e5"} !important;\n }\n\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] .yaymail-order-detail-row-payment_method td,\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] .yaymail-order-detail-row-payment_method th {\n border-bottom: 1px solid ${t.border_color??"#e5e5e5"} !important;\n }\n \n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table td {\n font-size: ${t.table_content_font_size??14}px !important;\n }\n\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table th {\n font-size: ${t.table_heading_font_size??14}px !important;\n }\n `),[e.id,t.table_content_font_size,t.table_heading_font_size,t.border_color]);return Mn.jsxs(uH,{className:"yaymail-customizer-element-order-details",element:e,style:r,children:[Mn.jsx("style",{children:C}),Mn.jsx("div",{className:"yaymail-order-details-title",style:s,dangerouslySetInnerHTML:{__html:l}}),Mn.jsx("table",{className:"yaymail-order-details-table",...x,cellSpacing:"0",cellPadding:"6",style:a,border:1,dangerouslySetInnerHTML:{__html:d}})]})})),UF=window.React.useMemo,YF=bH((({element:e})=>{const t=e.data,{doShortcode:n}=eF(),i=fO(),o=cE((e=>e.settings)),r=UF((()=>(null==o?void 0:o.show_product_image)??!1),[null==o?void 0:o.show_product_image]),a=UF((()=>(null==o?void 0:o.product_image_position)??"top"),[null==o?void 0:o.product_image_position]),s=UF((()=>({paddingTop:UE(t.padding.top),paddingRight:UE(t.padding.right),paddingBottom:UE(t.padding.bottom),paddingLeft:UE(t.padding.left),backgroundColor:t.background_color||"transparent",fontFamily:t.font_family??"initial"})),[t.padding,t.background_color,t.font_family]),l=UF((()=>({color:t.title_color??ix.color.black[700],marginTop:UE(0),fontFamily:t.font_family??"initial",marginBottom:UE(7)})),[t.title_color,t.font_family,UE]),c=UF((()=>({border:`1px solid ${t.border_color}`,fontFamily:t.font_family??"initial",color:t.text_color??ix.color.black[700],width:"100%"})),[t.font_family,t.text_color,t.border_color]),u=UF((()=>"modern"===t.layout_type),[t.layout_type]),d=UF((()=>({...r?{"product-image-position":"rtl"===i&&"left"===a?"right":a}:{},...u?{"data-layout-type-modern":!0}:{}})),[r,a,u,i]),h=UF((()=>n(t.title??"")),[e.data.title,n]),p=UF((()=>n(t.rich_text??"")),[e.data.rich_text,n]),m=UF((()=>{const e=t.product_title,n=t.expires_title,r=t.download_title;let a=p;return"rtl"===i&&(a=a.replaceAll(/text-align:left/g,"text-align:right")),"ltr"===i&&(a=a.replaceAll(/text-align:right/g,"text-align:left")),GE(a,{product_title:e,expires_title:n,download_title:r,...o})}),[p,t.product_title,t.expires_title,t.download_title,o,i]),f=UF((()=>`\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-download-content[data-layout-type-modern] {\n border: 0 !important;\n }\n\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-download-content[data-layout-type-modern] th,\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-download-content[data-layout-type-modern] td {\n border: 0 !important;\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-download-content[data-layout-type-modern] .yaymail-order-details-download-title--download,\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-download-content[data-layout-type-modern] .yaymail-order-details-download-content--download {\n text-align: right !important;\n }\n\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-download-content td {\n font-size: ${t.table_content_font_size??14}px !important;\n }\n\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-download-content th {\n font-size: ${t.table_heading_font_size??14}px !important;\n }\n `),[e.id,t.title_color,t.table_content_font_size,t.table_heading_font_size]);return console.log(t.table_content_font_size,t.table_heading_font_size),Mn.jsxs(uH,{className:"yaymail-customizer-element-order-details-download",element:e,style:s,children:[Mn.jsx("style",{children:f}),""!==m&&Mn.jsxs(Mn.Fragment,{children:[Mn.jsx("div",{className:"yaymail-order-details-download-title",style:l,dangerouslySetInnerHTML:{__html:h}}),Mn.jsx("table",{...d,className:"yaymail-order-details-download-content",cellSpacing:"0",cellPadding:"6",style:c,border:1,dangerouslySetInnerHTML:{__html:m}})]})]})})),ZF=window.React.useMemo,GF=bH((({element:e})=>{const t=e.data,n=ZF((()=>({textAlign:t.align??"center",paddingTop:UE(t.padding.top??0),paddingRight:UE(t.padding.right??0),paddingBottom:UE(t.padding.bottom??0),paddingLeft:UE(t.padding.left??0),backgroundColor:t.background_color||"transparent"})),[t.align,t.padding,t.background_color]),i=ZF((()=>({display:"inline-table",borderCollapse:"collapse"})),[]),o=ZF((()=>t.active_stars),[t.active_stars]),r=ZF((()=>Math.round(t.total_stars)),[t.total_stars]),a=ZF((()=>UE(t.size)),[t.size]);return Mn.jsx(uH,{className:"yaymail-customizer-element-rating-stars",element:e,style:n,children:Mn.jsx("table",{className:"yaymail-element-rating-stars",cellPadding:"0",cellSpacing:"0",role:"presentation",style:i,children:Mn.jsx("tbody",{children:Mn.jsx("tr",{children:Mn.jsx("td",{children:Array.from({length:r}).map(((e,n)=>{const i={color:n{const t=e.data,{doShortcode:n}=eF(),i=qF((()=>({paddingTop:y$(t.padding.top),paddingRight:y$(t.padding.right),paddingBottom:y$(t.padding.bottom),paddingLeft:y$(t.padding.left),backgroundColor:t.background_color||"transparent",fontFamily:t.font_family??"initial"})),[t]),o=qF((()=>({color:t.text_color??ix.color.black[700],padding:y$(12),border:`1px solid ${t.border_color??"#e5e5e5"}`})),[t.text_color,y$,t.border_color]),r=qF((()=>({color:t.title_color??ix.color.black[700],margin:"0 0 7px 0",fontSize:y$(20),fontWeight:600})),[t.title_color,y$]),a=qF((()=>n(t.title??"")),[t.title,n]),s=qF((()=>n(t.rich_text??"")),[t.rich_text,n]),l=qF((()=>"modern"===t.layout_type),[t.layout_type]),c=qF((()=>({...l?{"data-layout-type-modern":!0}:{}})),[l]),u=qF((()=>`\n [data-yaymail-element-id="${e.id}"] .yaymail-shipping-address-wrap[data-layout-type-modern] {\n border: 0 !important;\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n `),[e.id]);return Mn.jsxs(uH,{className:"yaymail-customizer-element-shipping_addrees",element:e,style:i,children:[Mn.jsx("style",{children:u}),Mn.jsx("div",{className:"yaymail-shipping-title",style:r,dangerouslySetInnerHTML:{__html:a}}),s?Mn.jsx("div",{className:"yaymail-shipping-address-wrap",style:o,dangerouslySetInnerHTML:{__html:s},...c}):Mn.jsx("div",{className:"yaymail-shipping-address-wrap",style:o,...c,children:Mn.jsx("address",{children:__("No Shipping address set.","yaymail")})})]})})),QF=()=>Mn.jsxs("div",{className:"yaymail-skeleton-divider",children:[Mn.jsx(Zo,{title:!1,round:!0,paragraph:{rows:1,width:"30%"},style:{marginBottom:10}}),Mn.jsx(Zo,{title:!1,round:!0,paragraph:{rows:1,width:"100%"},className:"yaymail-skeleton-divider__image",style:{marginBottom:10}}),Mn.jsx(Zo,{title:!1,round:!0,paragraph:{rows:1,width:"70%"}}),Mn.jsx(Zo,{title:!1,round:!0,paragraph:{rows:1,width:"100%"}}),Mn.jsx(Zo,{title:!1,round:!0,paragraph:{rows:1,width:"100%"}})]}),XF=window.React.useMemo,JF=bH((({element:e})=>{const t=e.data,n=XF((()=>t.icon_list.map((({icon:e})=>{const n=(window.yaymailData.builder.social_icons.images??[]).find((t=>t.name===e)),i=null==n?void 0:n.data.find((e=>e.theme===t.theme));return{iconName:e,...i}}))),[t.icon_list,t.theme]),i=XF((()=>({backgroundColor:t.background_color??"transparent",paddingTop:UE(t.padding.top),paddingRight:UE(t.padding.right),paddingBottom:UE(t.padding.bottom),paddingLeft:UE(t.padding.right)})),[t.padding,t.background_color]),o=XF((()=>({borderCollapse:"collapse",margin:"center"===t.align?"0 auto":"right"===t.align?"0 0 0 auto":"0",width:"auto"})),[t.align]),r=XF((()=>({width:UE(t.width_icon??0)})),[t.width_icon]);return Mn.jsx(uH,{className:"yaymail-customizer-element-social",element:e,style:i,children:Mn.jsx("table",{cellPadding:"0",cellSpacing:"0",role:"presentation",style:o,children:Mn.jsx("tbody",{children:Mn.jsx("tr",{children:Mn.jsx("td",{style:{textAlign:t.align??"center",verticalAlign:"top",padding:0},children:null==n?void 0:n.map(((e,n)=>Mn.jsx("span",{style:{paddingLeft:UE((t.spacing??0)/2),paddingRight:UE((t.spacing??0)/2),paddingTop:0,paddingBottom:0,verticalAlign:"top",textAlign:"center",margin:"5px 0",display:"inline-block"},className:"yaymail-social-icon-item",children:Mn.jsx("a",{style:{border:"none",textDecoration:"none",display:"inline-block"},children:Mn.jsx("img",{src:null==e?void 0:e.src,alt:(null==e?void 0:e.name)??"",style:{...r,display:"block",border:0,margin:0,padding:0,outline:"none"}})})},n)))})})})})})})),eV=window.React.useMemo,tV=bH((({element:e})=>{const t=e.data,n=eV((()=>({backgroundColor:t.background_color||"transparent"})),[t.background_color]),i=eV((()=>({height:y$(t.height??40),fontSize:0,backgroundColor:t.background_color||"transparent"})),[t.height,t.background_color]);return Mn.jsx(uH,{className:"yaymail-customizer-element-space",element:e,style:n,children:Mn.jsx("table",{cellPadding:"0",cellSpacing:"0",role:"presentation",style:{borderCollapse:"collapse",width:"100%"},children:Mn.jsx("tbody",{children:Mn.jsx("tr",{children:Mn.jsx("td",{style:i,children:" "})})})})})})),nV=window.React.useMemo,iV=bH((({element:e})=>{const t=e.data,{doShortcode:n}=eF(),i=nV((()=>({paddingTop:UE(t.padding.top),paddingRight:UE(t.padding.right),paddingBottom:UE(t.padding.bottom),paddingLeft:UE(t.padding.left),backgroundColor:t.background_color||"transparent"})),[t]),o=nV((()=>({fontFamily:t.font_family??"initial",color:t.text_color??ix.color.black[700]})),[t.font_family,t.text_color]),r=nV((()=>n(t.rich_text??"")),[t.rich_text,n]);return Mn.jsx(uH,{className:"yaymail-customizer-element-text",element:e,style:i,children:Mn.jsx("div",{style:o,dangerouslySetInnerHTML:{__html:r}})})})),oV=window.React.useMemo;function rV({columnWidth:e,index:t,columnSettings:n,onSelect:i}){const{doShortcode:o}=eF(),r=xz((e=>e.selectedColumn===t)),a=xz((e=>e.selectedElement)),s=oV((()=>n.button_align.value),[n.button_align.value]),l=oV((()=>({paddingTop:UE((null==n?void 0:n.padding.value.top)??0),paddingRight:UE((null==n?void 0:n.padding.value.right)??0),paddingBottom:UE((null==n?void 0:n.padding.value.bottom)??0),paddingLeft:UE((null==n?void 0:n.padding.value.left)??0),fontFamily:(null==n?void 0:n.font_family.value)??"initial"})),[null==n?void 0:n.padding.value,null==n?void 0:n.font_family.value]),c=oV((()=>({paddingTop:UE(n.button_padding.value.top||0),paddingRight:UE(n.button_padding.value.right||0),paddingBottom:UE(n.button_padding.value.bottom||0),paddingLeft:UE(n.button_padding.value.left||0),width:UE(n.button_width.value??50,"%"),margin:"center"===s?"0 auto":"auto",float:"left"===s||"right"===s?s:"unset"})),[n.button_padding.value,n.button_width.value,s]),u=oV((()=>{var e,t,i,o;return{borderTopLeftRadius:UE((null==(e=n.button_border_radius.value)?void 0:e.top_left)??5),borderTopRightRadius:UE((null==(t=n.button_border_radius.value)?void 0:t.top_right)??5),borderBottomRightRadius:UE((null==(i=n.button_border_radius.value)?void 0:i.bottom_right)??5),borderBottomLeftRadius:UE((null==(o=n.button_border_radius.value)?void 0:o.bottom_left)??5),fontSize:UE(n.button_font_size.value??13),fontWeight:n.button_weight.value||"inherit",backgroundColor:n.button_background_color.value||ix.color.wcPurple.default,textAlign:"center"}}),[n.button_border_radius.value,n.button_font_size.value,n.button_weight.value,n.button_background_color.value]),d=oV((()=>({fontFamily:n.button_font_family.value??"initial",lineHeight:UE(n.button_height.value??21),color:n.button_text_color.value||ix.color.white})),[n.button_font_family.value,n.button_height.value,n.button_text_color.value]),h=oV((()=>o((null==n?void 0:n.rich_text.value)??"")),[n.rich_text.value,o]);return Mn.jsx("td",{valign:"top",style:{width:UE(e,"%")},"data-column":t,children:Mn.jsx("table",{style:{width:"100%",tableLayout:"fixed"},children:Mn.jsxs("tbody",{children:[Mn.jsx("tr",{children:Mn.jsx("td",{children:Mn.jsx("div",{onClick:()=>i(t,1),className:"yaymail-table-text-list-column "+(r&&1===a?"active":""),style:l,dangerouslySetInnerHTML:{__html:h}})})}),(null==n?void 0:n.show_button)&&Mn.jsx("tr",{children:Mn.jsx("td",{onClick:()=>i(t,2),className:"yaymail-table-text-list-column "+(r&&2===a?"active":""),children:Mn.jsx("table",{style:c,align:s,children:Mn.jsx("tbody",{children:Mn.jsx("tr",{children:Mn.jsx("td",{children:Mn.jsx("a",{className:"yaymail-customizer-element-text-list-button__anchor",href:n.button_url.value,style:u,target:"_blank",rel:"noreferrer",children:Mn.jsx("span",{style:d,children:n.button_text.value})})})})})})})})]})})})}const aV=bH((({element:e})=>{const t=e.data,n=oV((()=>100/Number(t.number_column)),[t.number_column]),i=oV((()=>({backgroundColor:t.background_color||"transparent"})),[t.background_color]),o=oV((()=>({color:t.text_color||"transparent"})),[t.text_color]),r=xz((e=>e.selectColumn)),a=xz((e=>e.selectElement)),s=(e,t)=>{r(e),a(t)};return Mn.jsx(uH,{className:"yaymail-customizer-element-text-list",element:e,style:i,children:Mn.jsx("table",{className:"yaymail-table-text-list",children:Mn.jsx("tbody",{children:Mn.jsx("tr",{style:o,children:[...Array(Number(t.number_column)).keys()].map((t=>Mn.jsx(rV,{index:t+1,columnWidth:n,columnSettings:e.data.text_list[`column_${t+1}`],onSelect:s},t+1)))})})})})})),sV=window.React.useMemo,lV=(e,t=!1)=>{var n;const i=(null==(n=rz.find((t=>t.value===e)))?void 0:n.size)??16;return"default"===e&&t?13:i},cV=bH((({element:e})=>{const t=e.data,n=sV((()=>lV(t.title_size)),[t.title_size]),i=sV((()=>lV(t.subtitle_size,!0)),[t.subtitle_size]),o=sV((()=>({textAlign:t.align??"center",paddingTop:UE(t.padding.top),paddingRight:UE(t.padding.right),paddingBottom:UE(t.padding.bottom),paddingLeft:UE(t.padding.left),backgroundColor:t.background_color||"transparent",lineHeight:"normal"})),[t.align,t.padding,t.background_color]),r=sV((()=>({fontFamily:t.font_family??"initial",color:t.text_color??ix.color.black[700],fontSize:UE(n),margin:0})),[e.data.text_color,e.data.font_family,n]),a=sV((()=>({fontFamily:t.font_family??"initial",color:t.text_color??ix.color.black[700],fontSize:UE(i),margin:0})),[t.text_color,t.font_family,i]);return Mn.jsxs(uH,{className:"yaymail-customizer-element-title",element:e,style:o,children:[Mn.jsx("h1",{className:"yaymail-customizer-element-title__title",style:r,children:t.title}),Mn.jsx("h4",{className:"yaymail-customizer-element-title__subtitle",style:a,children:t.subtitle})]})})),uV=e=>lO.createElement("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("g",{"data-name":"Layer 13"},lO.createElement("circle",{cx:16,cy:16,r:14,fill:"#ffffff",className:"fill-f2d8c2"}),lO.createElement("path",{d:"M23.49 15.11 12.78 9.56a1 1 0 0 0-1.46.89v11.1a1 1 0 0 0 .48.86 1.07 1.07 0 0 0 .52.14 1 1 0 0 0 .46-.11l10.71-5.55a1 1 0 0 0 0-1.78Z",fill:"#000000",className:"fill-568c78"}))),dV=window.React.useMemo,[hV,pV]=[172,172],mV=bH((({element:e})=>{const t=e.data,n=dV((()=>({wordBreak:"break-word",textAlign:"center",backgroundColor:t.background_color||"transparent",paddingTop:UE(t.padding.top??0),paddingRight:UE(t.padding.right??0),paddingBottom:UE(t.padding.bottom??0),paddingLeft:UE(t.padding.left??0)})),[t]),i=dV((()=>({display:"table",borderCollapse:"collapse",width:"100%",textAlign:"center"})),[]),o=dV((()=>({backgroundImage:t.src?`url(${t.src})`:"",backgroundSize:"cover",backgroundPosition:"center",width:UE(t.width??hV),height:UE(t.height??pV),textAlign:"center",verticalAlign:"middle",display:"table-cell"})),[t.width,t.height,t.src]),r=dV((()=>({fontSize:14,fontWeight:"bold",textDecoration:"none",textTransform:"capitalize",verticalAlign:"middle",marginRight:10,maxWidth:"100%",width:56,height:56,display:"inline-block",border:"none"})),[]),a=dV((()=>({textDecoration:"none",display:"inline-block"})),[]);return Mn.jsx(uH,{className:"yaymail-customizer-element-video",element:e,style:n,children:Mn.jsx("table",{className:"yaymail-customizer-element-video",role:"presentation",border:0,align:"center",cellPadding:0,cellSpacing:0,style:i,children:Mn.jsx("tbody",{children:Mn.jsx("tr",{children:Mn.jsx("td",{style:{textAlign:"center",padding:0,height:UE(t.height??pV)},children:Mn.jsx("a",{className:"yaymail-customizer-element-video__anchor",href:t.url,style:a,children:Mn.jsx("div",{className:"yaymail-customizer-element-video__thumbnail",style:o,children:Mn.jsx(uV,{className:"yaymail-customizer-element-video__btn-play",style:r})})})})})})})})})),fV=window.React.useMemo,gV=({element:e,columnIndex:t,parentId:n})=>{const i=fV((()=>e.id),[e.id]),o=function(e){const t=tF.getState().addonComponents.find((t=>t.type===e));return t?t.component:()=>null}(e.type);switch(e.type){case"logo":return Mn.jsx(VF,{element:e},i);case"heading":return Mn.jsx(SF,{element:e},i);case"video":return Mn.jsx(mV,{element:e},i);case"image":return Mn.jsx(NF,{element:e},i);case"image_box":return Mn.jsx(DF,{element:e},i);case"image_list":return Mn.jsx(zF,{element:e},i);case"title":return Mn.jsx(cV,{element:e},i);case"button":return Mn.jsx(cF,{element:e},i);case"text":return Mn.jsx(iV,{element:e},i);case"text_list":return Mn.jsx(aV,{element:e},i);case"footer":return Mn.jsx(CF,{element:e},i);case"html":return Mn.jsx(jF,{element:e},i);case"space":return Mn.jsx(tV,{element:e},i);case"divider":return Mn.jsx(wF,{element:e},i);case"column_layout":return Mn.jsx(vF,{element:e,children:Mn.jsx(yV,{parentId:e.id,elements:e.children})},i);case"column":return qE(t)?Mn.jsx(fF,{columnIndex:t,list:e.children,parentId:n,width:e.data.width,children:Mn.jsx(yV,{parentId:e.id,elements:e.children})},i):null;case"shipping_address":return Mn.jsx(KF,{element:e},i);case"billing_shipping_address":return Mn.jsx(aF,{element:e},i);case"billing_address":return Mn.jsx(iF,{element:e},i);case"social_icon":return Mn.jsx(JF,{element:e},i);case"hook":return Mn.jsx(AF,{element:e},i);case"order_details":return Mn.jsx(WF,{element:e},i);case"order_details_download":return Mn.jsx(YF,{element:e},i);case"skeleton_divider":return Mn.jsx(QF,{});case"rating_stars":return Mn.jsx(GF,{element:e},i);default:return null!==o?Mn.jsx(o,{element:e},i):null}},yV=({parentId:e,elements:t})=>t?Mn.jsx(vV,{parentId:e,list:t}):null,vV=({list:e,parentId:t})=>{const n=hM((e=>e.elements)),i=null==n?void 0:n.map((e=>e.type));return Mn.jsx(Mn.Fragment,{children:null==e?void 0:e.map(((e,n)=>i.includes(e.type)?Mn.jsx(gV,{element:e,columnIndex:n,parentId:t},e.id):null))})},bV=window.React.useMemo;function wV({section:e,...t}){const n=cE((e=>e.settings)),{globalHeaderElements:i,globalFooterElements:o}=hM((e=>e.globalHeaderFooter)),r=hM((e=>e.currentTemplate)),a=hM((e=>{var t;return null==(t=e.templateData)?void 0:t.global_header_settings})),s=hM((e=>{var t;return null==(t=e.templateData)?void 0:t.global_footer_settings})),l=eM((e=>e.specialEditorScreen)),c=eM((e=>e.setSpecialEditorScreen)),u=eM((e=>e.unchooseElement)),d=bV((()=>(null==n?void 0:n.global_header_footer_enabled)??!1),[null==n?void 0:n.global_header_footer_enabled]),h=bV((()=>"header"===e?i:o),[e,i,o]),p=bV((()=>"header"===e?null==a?void 0:a.hidden:null==s?void 0:s.hidden),[e,null==a?void 0:a.hidden,null==s?void 0:s.hidden]),m=bV((()=>(null==l?void 0:l.key)===("header"===e?"global_header":"global_footer")),[null==l?void 0:l.key,e]);return"yaymail_global_header_footer"==r?null:d&&h&&0!==h.length?Mn.jsx(he,{title:__("Click to edit","yaymail").replace("%s",e),placement:"left",children:Mn.jsx("div",{...t,className:_$("yaymail-customizer-email-global-header-footer-container","yaymail-sortable-static","yaymail-customizer-element",{"yaymail-customizer-email-global-header-footer-container-selected":m}),...p?{"data-hidden":!0}:{},...m?{"data-selected":!0}:{},"data-type":e,onClick:()=>{c({key:"header"===e?"global_header":"global_footer",title:__("header"===e?"Global Header":"Global Footer","yaymail")}),u()},children:p?Mn.jsx("div",{className:"yaymail-customizer-email-global-header-footer-container-hidden",children:"header"===e?Mn.jsx(xV,{}):Mn.jsx(CV,{})}):Mn.jsx(vV,{list:h})})}):null}const xV=()=>Mn.jsxs("svg",{width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Mn.jsx("path",{d:"M18.5833 1.66667V18.3333H1.91667V1.66667H18.5833ZM19.1389 0H1.36111C0.75 0 0.25 0.5 0.25 1.11111V18.8889C0.25 19.5 0.75 20 1.36111 20H19.1389C19.75 20 20.25 19.5 20.25 18.8889V1.11111C20.25 0.5 19.75 0 19.1389 0Z",fill:"#AAACBA"}),Mn.jsx("path",{d:"M17.728 2.09961H2.7613C2.61402 2.09961 2.49463 2.219 2.49463 2.36628V6.27739C2.49463 6.42466 2.61402 6.54405 2.7613 6.54405H17.728C17.8752 6.54405 17.9946 6.42466 17.9946 6.27739V2.36628C17.9946 2.219 17.8752 2.09961 17.728 2.09961Z",fill:"#AAACBA"})]}),CV=()=>Mn.jsxs("svg",{width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Mn.jsx("path",{d:"M19.0833 1.66667V18.3333H2.41667V1.66667H19.0833ZM19.6389 0H1.86111C1.25 0 0.75 0.5 0.75 1.11111V18.8889C0.75 19.5 1.25 20 1.86111 20H19.6389C20.25 20 20.75 19.5 20.75 18.8889V1.11111C20.75 0.5 20.25 0 19.6389 0Z",fill:"#AAACBA"}),Mn.jsx("path",{d:"M18.228 13.3447H3.2613C3.11402 13.3447 2.99463 13.4641 2.99463 13.6114V17.5225C2.99463 17.6698 3.11402 17.7892 3.2613 17.7892H18.228C18.3752 17.7892 18.4946 17.6698 18.4946 17.5225V13.6114C18.4946 13.4641 18.3752 13.3447 18.228 13.3447Z",fill:"#AAACBA"})]}),_V=window.React.useEffect,SV=window.React.useMemo,kV=()=>{const e=cE((e=>e.settings)),t=hM((e=>e.currentTemplate)),n=hM((e=>e.templateData)),i=fO(),o=eM((e=>e.list)),r=eM((e=>e.updateList));_V((()=>{const e=eM.subscribe((e=>e.chosenElement),(e=>{if(null==e?void 0:e.id){const t=structuredClone(o);c$((null==e?void 0:e.id)||0,t,e),eM.setState((()=>({list:t})))}}),{equalityFn:oE});return()=>{e()}}),[o]);const a=eM((e=>e.unchooseElement));_V((()=>{a()}),[]);const s=SV((()=>e&&e.container_width&&!isNaN(e.container_width)?null==e?void 0:e.container_width:605),[e]),l=SV((()=>({width:UE(s),direction:i})),[s,i]);return _V((()=>{"rtl"==i&&EA("right"),"ltr"==i&&EA("left")}),[i]),Mn.jsxs(Mn.Fragment,{children:[Mn.jsx(yO,{}),Mn.jsx($V,{}),Mn.jsxs(YT,{list:o,setList:r,useHandle:!0,style:l,className:`yaymail-customizer-email-template-container yaymail-template-${t} ${"already_supported"!==(null==n?void 0:n.support_status)&&"yaymail-uneditable-template"}`,children:[Mn.jsx(wV,{section:"header",style:l}),Mn.jsx(EV,{list:o,style:l,children:Mn.jsx(vV,{list:o})}),Mn.jsx(wV,{section:"footer",style:l})]})]})};function EV({children:e,list:t,style:n}){return Mn.jsx(Mn.Fragment,{children:t.length>0?e:Mn.jsxs("div",{className:"yaymail-customizer-email-template-container__empty",style:n,children:[Mn.jsx("h2",{children:__("Your template is empty","yaymail")}),Mn.jsx("p",{children:__("Drag elements here to start customizing","yaymail")})]})})}const $V=()=>{const e=cE((e=>{var t;return(null==(t=e.settings)?void 0:t.custom_css)??""}));return""==e?null:Mn.jsx("style",{className:"yaymail-setting-custom_css",children:`\n .yaymail-customizer-email-template-container {\n ${e}\n }\n `})},MV=e=>lO.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("path",{d:"M12.6973 3.30273L14.7803 5.38672L15 5.60645V11.25C15 13.321 13.3209 14.9998 11.25 15H4.75C2.67893 15 1 13.3211 1 11.25V4.75C1.00016 2.67907 2.67903 1 4.75 1H10.3945L12.6973 3.30273ZM4.75 2.5C3.50746 2.5 2.50016 3.5075 2.5 4.75V11.25C2.5 12.4926 3.50736 13.5 4.75 13.5H11.25C12.4925 13.4998 13.5 12.4925 13.5 11.25V6.66699H11.084C10.1176 6.66699 9.33411 5.88338 9.33398 4.91699V2.5H4.75ZM10.834 4.91699C10.8341 5.05495 10.946 5.16699 11.084 5.16699H12.4404L10.834 3.56055V4.91699Z",fill:"currentColor"})),RV=()=>Mn.jsx("h4",{className:XD,children:__("Are you sure you want to empty this template?","yaymail")}),AV=({isOpen:e,onClose:t})=>{const n=eM((e=>e.removeAllElements)),i=hM((e=>e.hideTemplateGlobalHeader)),o=hM((e=>e.hideTemplateGlobalFooter));return Mn.jsx(Gb,{title:Mn.jsx(tH,{content:Mn.jsx(RV,{})}),className:"yaymail-global__modal yaymail-blank-template__modal",open:e,onCancel:t,centered:!0,width:"500px",footer:Mn.jsx(eH,{onOk:()=>{n(["skeleton_divider"]),i(!0),o(!0),t()},onCancel:()=>{t()},okText:"Empty"}),destroyOnClose:!0,children:Mn.jsx("div",{className:"modal__content",children:__("Your template content will be empty, but it isn't saved yet.","yaymail")})})},OV=window.React.useMemo,jV=window.React.useState,TV=()=>{const e=hM((e=>{var t;return"already_supported"===(null==(t=e.templateData)?void 0:t.support_status)})),[t,n]=jV(!1),i=eM((e=>{var t;return 0===(null==(t=e.list)?void 0:t.length)})),o=()=>{n(!0)},r=OV((()=>i||!e),[i,e]);return Mn.jsxs("div",{className:"header__btn--action",children:[Mn.jsx(he,{placement:"bottom",title:__("Empty layout","yaymail"),children:Mn.jsx(Ct,{onClick:o,disabled:r,className:"yaymail-btn--icon-only",children:Mn.jsx("span",{className:"anticon",style:{display:"flex"},children:Mn.jsx(MV,{})})})}),!r&&Mn.jsx(AV,{isOpen:t,onOpen:o,onClose:()=>{n(!1)}})]})},NV=window.React.useCallback,LV=window.React.useMemo,IV=()=>{const[e,t]=sw.useNotification({maxCount:1}),n=hM((e=>{var t;return(null==(t=e.templateData)?void 0:t.status)??"inactive"})),i=hM((e=>e.currentTemplate)),o=hM((e=>e.templateData)),r=hM((e=>e.updateItemTemplates)),{changeStatusMutation:a}=rA({template_name:i,fetch:!1}),s=(t,n)=>{e[t]({message:n,placement:"bottomRight",duration:3})},l=NV((async()=>{try{const e="active"===n?"inactive":"active";!0===(await a.mutateAsync({list_id:[(null==o?void 0:o.id)||""],status:e})).success?(o&&(o.status=e),i&&r((t=>{ZE(t,"status",e)}),i),s("success",__("active"===e?"This template is enabled":"This template is disabled","yaymail"))):s("error",__("Can't change status template","yaymail"))}catch(e){console.error("An error occurred:",e)}}),[n,o,a]),c=LV((()=>"already_supported"===(null==o?void 0:o.support_status)),[null==o?void 0:o.support_status]);return Mn.jsxs(Mn.Fragment,{children:[t,Mn.jsx("div",{className:"header__enable-template-switcher",children:Mn.jsx(he,{placement:"bottom",title:"active"===(null==o?void 0:o.status)?__("Disable this template","yaymail"):__("Enable this template","yaymail"),children:Mn.jsx(ww,{checked:"active"===(null==o?void 0:o.status),onChange:l,disabled:!c})})})]})},DV=e=>lO.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("g",{clipPath:"url(#clip0_542_13490)"},lO.createElement("path",{d:"M14.498 7.32227C14.9122 7.32237 15.248 7.65812 15.248 8.07227C15.248 10.0197 14.5781 11.82 13.3125 13.1377C12.0418 14.4606 10.2155 15.25 7.99902 15.25C5.78251 15.25 3.95623 14.4605 2.68555 13.1377C1.41998 11.82 0.750042 10.0197 0.75 8.07227C0.75 7.65805 1.08579 7.32227 1.5 7.32227C1.91412 7.32237 2.25 7.65812 2.25 8.07227C2.25004 9.67611 2.79916 11.0903 3.76758 12.0986C4.73092 13.1014 6.15412 13.75 7.99902 13.75C9.84394 13.75 11.2672 13.1015 12.2305 12.0986C13.1989 11.0903 13.748 9.67611 13.748 8.07227C13.748 7.6581 14.0839 7.32234 14.498 7.32227ZM7.90137 0.75C8.31558 0.75 8.65137 1.08579 8.65137 1.5V7.92871L9.45215 7.1377L9.50977 7.08691C9.80563 6.84834 10.2396 6.86756 10.5127 7.14355C10.7857 7.41967 10.8005 7.85424 10.5586 8.14746L10.5068 8.2041L8.42773 10.2607C8.15383 10.5316 7.72321 10.5485 7.42969 10.3115L7.37305 10.2607L5.29297 8.2041L5.24121 8.14746C4.99929 7.85421 5.01403 7.41966 5.28711 7.14355C5.56017 6.86757 5.99418 6.84835 6.29004 7.08691L6.34766 7.1377L7.15137 7.93164V1.5C7.15137 1.08579 7.48715 0.75 7.90137 0.75Z",fill:"currentColor"})),lO.createElement("defs",null,lO.createElement("clipPath",{id:"clip0_542_13490"},lO.createElement("rect",{width:16,height:16,fill:"white"})))),HV=window.React.useMemo,PV=window.React.useState,zV=()=>Mn.jsx(Mn.Fragment,{children:Mn.jsx("h4",{className:XD,children:__("Import content from other template","yaymail")})}),FV=({isOpen:e,onClose:t})=>{const n=hM((e=>e.templates)),i=hM((e=>e.templateData)),o=hM((e=>e.currentTemplate)),r=eM((e=>e.unchooseElement)),a=Lx((e=>e.notify)),[s,l]=PV(null),[c,u]=PV(!1),{copyTemplateMutation:d}=rA({template_name:o,fetch:!1}),h=HV((()=>(n??[]).map((e=>({...e,isTitleOversized:e.template_title.length>55})))),[n]);return Mn.jsx(Mn.Fragment,{children:Mn.jsx(Gb,{title:Mn.jsx(tH,{content:Mn.jsx(zV,{})}),className:"yaymail-global__modal yaymail-reset-template__modal",open:e,onCancel:t,centered:!0,width:"500px",footer:null,destroyOnClose:!0,children:Mn.jsxs("div",{className:"modal__content",children:[Mn.jsx("div",{style:{marginBottom:10},children:__("All your current configurations for this template will be lost after you import data.","yaymail")}),Mn.jsxs("div",{style:{marginTop:10},children:[Mn.jsx("h4",{style:{marginBottom:5,fontWeight:"normal"},children:__("From template","yaymail")}),Mn.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[Mn.jsx(Qt,{style:{width:"100%",marginRight:"10px"},className:"yaymail-global__select",value:s,placeholder:"Select template",onChange:e=>{l(e)},popupMatchSelectWidth:!1,children:h.map((e=>Mn.jsxs(Qt.Option,{value:e.name,disabled:o===e.name,className:"option-template",children:[Mn.jsx(he,{placement:"right",title:e.isTitleOversized?e.template_title:"",overlayInnerStyle:{fontSize:"11px",width:"max-content"},children:Mn.jsx("span",{className:"option-template__text",children:e.template_title})}),Mn.jsx("span",{className:"option-template__template-status","data-status":e.status})]},e.name)))}),Mn.jsx(Ct,{type:"primary",loading:c,onClick:async()=>{u(!0);try{const e=await d.mutateAsync({template_id:(null==i?void 0:i.id)||"",from_template:s||""});if(!0!==e.success)throw new Error(e.message??__("Import template failed"));t()}catch(e){null==a||a("error",e.message??__("Import template failed","yaymail"))}finally{r(),u(!1)}},disabled:null===s,children:"Import"},"ok")]})]})]})})})},VV=window.React.useState,BV=()=>{const e=hM((e=>{var t;return"already_supported"===(null==(t=e.templateData)?void 0:t.support_status)})),[t,n]=VV(!1),i=()=>{n(!0)};return Mn.jsxs("div",{className:"header__btn--action",children:[Mn.jsx(he,{placement:"bottom",title:"Import template",children:Mn.jsx(Ct,{onClick:i,disabled:!e,className:"yaymail-btn--icon-only",children:Mn.jsx("span",{className:"anticon",style:{display:"flex"},children:Mn.jsx(DV,{})})})}),e&&Mn.jsx(FV,{isOpen:t,onOpen:i,onClose:()=>{n(!1)}})]})},WV=e=>lO.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("path",{d:"M8 1.5C10.7552 1.50017 13.2377 3.1365 14.917 5.79492L15.0586 6.04199C15.3636 6.63449 15.499 7.33435 15.499 7.99902C15.499 8.75821 15.3212 9.56255 14.917 10.2012L14.918 10.2021C13.2387 12.861 10.7554 14.4979 8 14.498C5.24438 14.498 2.76043 12.8611 1.08105 10.2021L1.08203 10.2012C0.677866 9.56256 0.500034 8.75819 0.5 7.99902C0.5 7.23931 0.677276 6.43379 1.08203 5.79492C2.7614 3.13633 5.2446 1.5 8 1.5ZM8 3C5.88577 3 3.82946 4.25356 2.34961 6.59668L2.34863 6.59766C2.13288 6.93832 2 7.44602 2 7.99902C2.00003 8.4829 2.10242 8.9318 2.27246 9.26465L2.34863 9.40039L2.34961 9.40137L2.63379 9.82812C4.08672 11.8963 6.01799 12.998 8 12.998C10.114 12.9979 12.1697 11.7442 13.6494 9.40137L13.6504 9.40039L13.7266 9.26465C13.8966 8.93179 13.999 8.48293 13.999 7.99902C13.999 7.44599 13.8662 6.93832 13.6504 6.59766L13.6494 6.59668C12.1697 4.25372 10.1141 3.00017 8 3ZM8 4.76562C9.78491 4.76578 11.2188 6.21829 11.2188 8.00293C11.2185 9.78732 9.78473 11.2401 8 11.2402C6.21514 11.2402 4.78057 9.78741 4.78027 8.00293C4.78027 6.21819 6.21495 4.76562 8 4.76562ZM8 6.26562C7.05349 6.26562 6.28027 7.03648 6.28027 8.00293C6.28057 8.96912 7.05367 9.74023 8 9.74023C8.9462 9.74008 9.71845 8.96902 9.71875 8.00293C9.71875 7.03657 8.94638 6.26578 8 6.26562Z",fill:"currentColor"})),UV=()=>Mn.jsx("div",{className:"yaymail-customizer-preview-email__empty-container",children:Mn.jsx(kn,{className:"yaymail-customizer-preview-email__empty-content",image:Mn.jsx(DI,{}),imageStyle:{marginBottom:20,marginTop:20,color:"#9E9E9E",height:"fit-content"},description:Mn.jsxs("span",{className:"yaymail-customizer-preview-email__message",children:["An error occurred while trying to get the previewing content.",Mn.jsx("br",{}),"Please"," ",Mn.jsx(Z_,{to:"https://yaycommerce.com/support/",target:"_blank",className:"yaymail-navlink",children:"contact YayMail Support"})," ","for help."]})})}),YV=e=>{const t="yaymail-template-content__mobile",n=window.jQuery(".yaymail-preview-template__modal .yaymail-preview-template-content");e?n.addClass(t):n.removeClass(t)},ZV=e=>lO.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},lO.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.25 16.4371C6.16445 15.2755 5.5 13.7153 5.5 12C5.5 8.41015 8.41015 5.5 12 5.5C15.5899 5.5 18.5 8.41015 18.5 12C18.5 13.7153 17.8356 15.2755 16.75 16.4371V16C16.75 14.4812 15.5188 13.25 14 13.25H10C8.48122 13.25 7.25 14.4812 7.25 16V16.4371ZM8.75 17.6304C9.70606 18.1835 10.8161 18.5 12 18.5C13.1839 18.5 14.2939 18.1835 15.25 17.6304V16C15.25 15.3096 14.6904 14.75 14 14.75H10C9.30964 14.75 8.75 15.3096 8.75 16V17.6304ZM4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12ZM14 10C14 11.1046 13.1046 12 12 12C10.8954 12 10 11.1046 10 10C10 8.89543 10.8954 8 12 8C13.1046 8 14 8.89543 14 10Z",fill:"#8526FF"})),GV=e=>lO.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("g",{clipPath:"url(#clip0_4482_4090)"},lO.createElement("path",{d:"M19 18H5C3.34 18 2 16.66 2 15V5C2 3.34 3.34 2 5 2H19C20.66 2 22 3.34 22 5V15C22 16.66 20.66 18 19 18Z",stroke:"currentColor",strokeWidth:1.5,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),lO.createElement("path",{d:"M2 13H22",stroke:"currentColor",strokeWidth:1.5,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),lO.createElement("path",{d:"M14 18H10V22H14V18Z",stroke:"currentColor",strokeWidth:1.5,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),lO.createElement("path",{d:"M8 22H16",stroke:"currentColor",strokeWidth:1.5,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"})),lO.createElement("defs",null,lO.createElement("clipPath",{id:"clip0_4482_4090"},lO.createElement("rect",{width:24,height:24,fill:"none"})))),qV=e=>lO.createElement("svg",{width:32,height:32,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("g",{clipPath:"url(#clip0_4482_313)"},lO.createElement("path",{d:"M15.5 22H8.5C6.03 22 4 19.98 4 17.5V6.5C4 4.03 6.03 2 8.5 2H15.5C17.98 2 20 4.03 20 6.5V17.5C20 19.98 17.98 22 15.5 22Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),lO.createElement("path",{d:"M10 6H14",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),lO.createElement("path",{d:"M11.9902 18H12.0102",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})),lO.createElement("defs",null,lO.createElement("clipPath",{id:"clip0_4482_313"},lO.createElement("rect",{width:24,height:24,fill:"none"}))));function KV({onChange:e,currentDevice:t}){return Mn.jsxs("div",{className:"yaymail-preview-device-switcher",children:[Mn.jsx(he,{placement:"bottom",title:"Desktop preview",children:Mn.jsx("div",{className:"yaymail-preview-device-switcher__item yaymail-preview-device-switcher--dekstop "+("desktop"===t?"yaymail-preview-device-switcher--active":""),onClick:()=>{e("desktop")},children:Mn.jsx(GV,{style:{width:"16px",height:"16px"}})})}),Mn.jsx(he,{placement:"bottom",title:"Mobile preview",children:Mn.jsx("div",{className:"yaymail-preview-device-switcher__item yaymail-preview-device-switcher--mobile "+("mobile"===t?"yaymail-preview-device-switcher--active":""),onClick:()=>{e("mobile")},children:Mn.jsx(qV,{style:{width:"16px",height:"16px"}})})})]})}const QV=window.React.useState,XV=()=>{const[e,t]=QV("desktop");return Mn.jsxs(Mn.Fragment,{children:[Mn.jsx("h4",{className:XD,children:__("Email preview","yaymail")}),Mn.jsx("div",{className:JD,children:Mn.jsx(KV,{onChange:n=>{n!==e&&(YV("mobile"===n),t(n))},currentDevice:e})})]})},JV=({isOpen:e,onClose:t,data:n,isLoading:i})=>{const o=(null==n?void 0:n.html)?Mn.jsxs("div",{className:"yaymail-preview-email__preview__content yaymail-preview-template-content",children:[Mn.jsxs("div",{className:"yaymail-preview-email__preview__content__subject",children:[Mn.jsx("h2",{style:{marginTop:0},children:(null==n?void 0:n.subject)??__("No subject","yaymail")}),Mn.jsxs("div",{className:"yaymail-preview-email__preview__content__subject__email-address",children:[Mn.jsx("div",{className:"yaymail-preview-email__preview__content__subject__email-address__icon",children:Mn.jsx(ZV,{})}),Mn.jsxs("p",{style:{margin:0,display:"flex",alignItems:"center",flexWrap:"wrap"},children:[Mn.jsx("span",{style:{fontWeight:"bold",marginRight:"3px"},children:window.yaymailData.site_title}),Mn.jsx("span",{children:`<${window.yaymailData.test_email_address}>`})]})]})]}),Mn.jsx("div",{className:"modal__content",dangerouslySetInnerHTML:{__html:n.html},style:{overflow:"auto"}})]}):Mn.jsx(UV,{});return Mn.jsx(Gb,{title:Mn.jsx(tH,{content:Mn.jsx(XV,{})}),className:"yaymail-global__modal yaymail-preview-template__modal",open:e,onCancel:()=>{t()},centered:!0,width:"70%",footer:null,destroyOnClose:!0,children:i?Mn.jsx(Sn,{className:"yaymail-loading-preview-template"}):o})},eB=window.React.useContext,tB=window.React.useState,nB=()=>{const e=hM((e=>{var t;return"already_supported"===(null==(t=e.templateData)?void 0:t.support_status)})),{selectedOrderID:t}=eB(hA),[n,i]=tB(!1),[o,r]=tB(!1),[a,s]=tB(null);return Mn.jsxs("div",{className:"header__btn--action",children:[Mn.jsx(he,{placement:"bottom",title:"Preview email",children:Mn.jsx(Ct,{onClick:()=>{(async()=>{r(!0);try{let e=hM.getState().templateData;const n=eM.getState().list,i=await async function(e,t){try{const n=await window.jQuery.ajax({type:"POST",url:window.yaymailData.admin_ajax.url,data:{action:"yaymail_preview_mail",nonce:window.yaymailData.admin_ajax.nonce,order_id:t,template_data:e,unsaved_settings:cE.getState().settings}});if(!n.success)throw new Error("Call ajax failed");return n}catch(n){throw console.error(n),n}}({...e,elements:n},t);i.success&&s({html:i.data.html,subject:i.data.subject})}catch(e){console.error(e)}finally{r(!1)}})(),i(!0)},disabled:!e,className:"yaymail-btn--icon-only",children:Mn.jsx("span",{className:"anticon",style:{display:"flex"},children:Mn.jsx(WV,{})})})}),Mn.jsx(JV,{isOpen:n,isLoading:o,data:a,onClose:()=>{i(!1),s(null)}})]})},iB=e=>lO.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("path",{d:"M6.58301 0.750768C6.85867 0.44168 7.33245 0.414604 7.6416 0.690221C7.95056 0.965898 7.97773 1.43971 7.70215 1.74881L7.18066 2.3328C7.44448 2.30465 7.71756 2.28983 8 2.28983C11.7114 2.29003 14.749 5.22916 14.749 8.8953C14.7488 12.5612 11.7112 15.5006 8 15.5008C4.28859 15.5008 1.25027 12.5613 1.25 8.8953C1.25 7.53543 1.6729 6.26737 2.39062 5.21659C2.62427 4.87458 3.09157 4.78667 3.43359 5.0203C3.77549 5.25398 3.86349 5.72129 3.62988 6.06327C3.07455 6.87635 2.75 7.85114 2.75 8.8953C2.75027 11.6987 5.08239 14.0008 8 14.0008C10.9174 14.0006 13.2488 11.6986 13.249 8.8953C13.249 6.0918 10.9176 3.79003 8 3.78983C7.64023 3.78983 7.29861 3.82048 6.97363 3.87479L7.91113 4.54374C8.24821 4.78422 8.32631 5.25243 8.08594 5.58964C7.84548 5.92671 7.37725 6.00571 7.04004 5.76542L4.70801 4.10233L4.64844 4.05546C4.64499 4.05243 4.64205 4.04876 4.63867 4.04569C4.61239 4.02174 4.5885 3.99613 4.56641 3.96952C4.55869 3.9602 4.55116 3.95083 4.54395 3.9412C4.5384 3.93381 4.53454 3.9253 4.5293 3.91776C4.50872 3.88805 4.48953 3.85796 4.47363 3.82596C4.46413 3.80691 4.45701 3.78703 4.44922 3.76737C4.43926 3.74216 4.42904 3.71725 4.42188 3.6912C4.41629 3.67093 4.41304 3.65028 4.40918 3.62967C4.40499 3.60726 4.40058 3.58501 4.39844 3.56229C4.39595 3.53595 4.39619 3.50965 4.39648 3.48319C4.39672 3.46232 4.39646 3.44154 4.39844 3.42069C4.4007 3.39675 4.40461 3.37311 4.40918 3.3494C4.41363 3.32641 4.41912 3.3037 4.42578 3.28104C4.43226 3.25893 4.43967 3.2372 4.44824 3.21561C4.45773 3.19177 4.46837 3.16839 4.48047 3.1453C4.50848 3.09179 4.54198 3.0401 4.58398 2.99296L6.58301 0.750768Z",fill:"currentColor"})),oB=window.React.useCallback,rB=window.React.useState,aB=()=>Mn.jsx(Mn.Fragment,{children:Mn.jsx("h4",{className:XD,children:__("Are you sure you want to reset this template?","yaymail")})}),sB=({isOpen:e,onClose:t})=>{const[n,i]=sw.useNotification({maxCount:1}),o=hM((e=>e.currentTemplate)),r=eM((e=>e.unchooseElement)),[a,s]=rB(!1),l=hM((e=>e.templateData)),{resetTemplateMutation:c}=rA({template_name:o,fetch:!1}),u=(e,t)=>{n[e]({message:t,placement:"bottomRight",duration:3})},d=hM((e=>e.setGlobalHeaderFooter)),h=oB((async()=>{try{s(!0);const e=await c.mutateAsync([(null==l?void 0:l.id)||""]);if(!0===e.success){if(u("success",__("Template reset successfully.","yaymail")),0!==e.list_template_data.length){const t=e.list_template_data[0].elements;if(0!==t.length){const e=t.findIndex((e=>"skeleton_divider"===e.type));if(e<0)return;const n=t.slice(0,e),i=t.slice(e+1);d({globalHeaderElements:n,globalFooterElements:i})}}}else u("error",__("Reset failed","yaymail"))}catch(e){console.error("An error occurred:",e)}finally{r(),s(!1),t()}}),[l,a,s]);return Mn.jsxs(Mn.Fragment,{children:[i,Mn.jsx(Gb,{title:Mn.jsx(tH,{content:Mn.jsx(aB,{})}),className:"yaymail-global__modal yaymail-reset-template__modal",open:e,onCancel:t,centered:!0,width:"500px",footer:Mn.jsx(eH,{onOk:h,onCancel:t,okText:__("Reset","yaymail"),isLoading:a}),destroyOnClose:!0,children:Mn.jsx("div",{className:"modal__content",children:__("All changes you made won't be saved.","yaymail")})})]})},lB=window.React.useState,cB=()=>{const e=hM((e=>{var t;return"already_supported"===(null==(t=e.templateData)?void 0:t.support_status)})),[t,n]=lB(!1),i=()=>{n(!0)};return Mn.jsxs("div",{className:"header__btn--action",children:[Mn.jsx(he,{placement:"bottom",title:__("Reset template","yaymail"),children:Mn.jsx(Ct,{onClick:i,disabled:!e,className:"yaymail-btn--icon-only",children:Mn.jsx("span",{className:"anticon",style:{display:"flex"},children:Mn.jsx(iB,{})})})}),e&&Mn.jsx(sB,{isOpen:t,onOpen:i,onClose:()=>{n(!1)}})]})},uB=window.React.useCallback,dB=window.React.useState,hB=e=>{const{onSaveSuccess:t,onSaveFailed:n}=e||{},i=hM((e=>e.templateData)),o=hM((e=>{var t;return(null==(t=e.templateData)?void 0:t.background_color)??window.yaymailData.colors.default_background_color})),r=hM((e=>{var t;return(null==(t=e.templateData)?void 0:t.text_link_color)??window.yaymailData.colors.default_text_link_color})),a=hM((e=>{var t;return(null==(t=e.templateData)?void 0:t.content_background_color)??"#ffffff"})),s=hM((e=>{var t;return(null==(t=e.templateData)?void 0:t.content_text_color)??"#000000"})),l=hM((e=>{var t;return(null==(t=e.templateData)?void 0:t.title_color)??"#000000"})),c=hM((e=>e.currentTemplate)),{updateTemplateMutation:u}=rA({template_name:c,fetch:!1}),d=Lx((e=>e.notify)),h=m_(),p=eM((e=>e.navigatingPath)),m=eM((e=>e.clearNavigatingPath)),f=QS(),{data:g}=rA({template_name:c}),[y,v]=dB(!1),b=async()=>{v(!0);const e={template_id:((null==i?void 0:i.id)??"").toString(),template_elements:b$(eM.getState().list),background_color:o,text_link_color:r,content_background_color:a,content_text_color:s,title_color:l,global_header_settings:null==i?void 0:i.global_header_settings,global_footer_settings:null==i?void 0:i.global_footer_settings};try{if(await u.mutateAsync(e))return eM.setState((()=>({hasChanged:!1}))),f.setQueryData(["template",c],{...g,background_color:e.background_color,content_background_color:e.content_background_color,content_text_color:e.content_text_color,text_link_color:e.text_link_color,title_color:e.title_color,elements:e.template_elements}),null==d||d("success",__("Save success","yaymail")),null==t||t(e),void(p&&h(p));null==d||d("error",__("Save failed","yaymail")),null==n||n()}catch(y){console.error("YayMail Error during save: ",y),null==d||d("error",__("Save failed","yaymail")),null==n||n()}finally{v(!1),m()}};return{saveFunction:uB((async()=>{window.yaymailData.shared.activated_addons.includes("yaymail_addon_conditional_logic")?"save"===await new Promise(((e,t)=>{ez("onYayMailBeforeSaveTemplate",{resolve:e,reject:t})}))&&b():b()}),[b]),isLoading:y}},pB=window.React.useContext,mB=window.React.useMemo,fB=({hasIcon:e,text:t,btnClassName:n,hasLoading:i,savingText:o,style:r,...a})=>{const s=hM((e=>{var t;return"already_supported"===(null==(t=e.templateData)?void 0:t.support_status)})),{onSaveSuccess:l}=pB(bA),c=eM((e=>e.hasChanged)),{saveFunction:u,isLoading:d}=hB({onSaveSuccess:l}),h=mB((()=>a.disabled||!c||!s),[c,s,a.disabled]);return Mn.jsx("section",{className:"yaymail-email-customizer__action yaymail-email-customizer__action__save-template",children:Mn.jsx(Ct,{type:"primary",disabled:h,onClick:u,className:n,loading:i&&d,icon:i&&d?Mn.jsx(JI,{}):void 0,style:{minWidth:69,textAlign:"center",...r},children:i&&d?o??__("Saving...","yaymail"):t??__("Save","yaymail")})})},gB=window.React.useContext,yB=window.React.useMemo,vB=({...e})=>{const{selectedOrderID:t,setSelectedOrderID:n,listOrders:i}=gB(hA),o=hM((e=>{var t;return"already_supported"===(null==(t=e.templateData)?void 0:t.support_status)}));return yB((()=>Mn.jsx(Qt,{className:"yaymail-global__select",onChange:n,popupMatchSelectWidth:!1,value:t,disabled:!o,autoClearSearchValue:!0,notFoundContent:Mn.jsx(kn,{description:"No order found"}),showSearch:!0,filterOption:(e,t)=>((null==t?void 0:t.label)??"").toLowerCase().includes(e.toLowerCase()),options:(i??[]).map((e=>({label:"sample_order"===e.id?e.title:`Order: #${e.title}`,value:e.id}))),...e})),[t,n,o,e,i])},bB=window.React.useMemo,wB=({...e})=>{const t=hM((e=>e.currentTemplate)),n=hM((e=>e.templates)),i=eM((e=>e.unchooseElement)),o=iM(),r=bB((()=>(n??[]).map((e=>({...e,isTitleOversized:e.template_title.length>33})))),[n]);return Mn.jsx(Qt,{placeholder:"Select template",className:"yaymail-global__select header__select-template",value:t,onChange:e=>{o(`/customizer/?template=${e}`),i()},popupMatchSelectWidth:!1,popupClassName:"header__select-template--popup",...e,children:r.map((e=>{const t=e.recipient?e.recipient:__("Recipient","yaymail");let n="cyan",i="option-template__template-recipient--third";t===__("Customer","woocommerce")&&(n="blue",i="option-template__template-recipient--primary");const o=t.length>11;return Mn.jsx(Qt.Option,{value:e.name,className:"option-template",children:Mn.jsxs("div",{className:"option-template__content",children:[Mn.jsx(he,{placement:"right",title:e.isTitleOversized?e.template_title:"",overlayInnerStyle:{fontSize:"11px",width:"max-content"},children:Mn.jsxs("span",{style:{display:"flex",alignItems:"center",gap:7},children:[Mn.jsx(Ka,{status:"active"===e.status?"success":"default",className:"option-template__template-status"}),Mn.jsx("span",{className:"option-template__text",children:e.template_title})]})}),Mn.jsx(he,{placement:"right",title:o?t:"",overlayInnerStyle:{width:"max-content"},children:Mn.jsx(Ka,{style:{marginLeft:3},count:t,color:n,className:`option-template__template-recipient ${i}`})})]})},e.name)}))})},xB=e=>lO.createElement("svg",{width:18,height:18,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("path",{d:"M12 0C5.38293 0 0 5.38293 0 12C0 18.6171 5.38293 24 12 24C18.6171 24 24 18.6171 24 12C24 5.38293 18.6171 0 12 0ZM18.082 9.45703L11.582 15.9569C11.387 16.1519 11.131 16.2501 10.875 16.2501C10.619 16.2501 10.363 16.1519 10.168 15.9569L6.91809 12.707C6.52698 12.316 6.52698 11.684 6.91809 11.293C7.30902 10.9019 7.94092 10.9019 8.33203 11.293L10.875 13.836L16.6681 8.04309C17.059 7.65198 17.6909 7.65198 18.082 8.04309C18.473 8.43402 18.473 9.06592 18.082 9.45703Z",fill:"#29B569"})),CB=e=>lO.createElement("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",width:80,height:80,viewBox:"0 0 1200 1200",enableBackground:"new 0 0 1200 1200",xmlSpace:"preserve",...e},lO.createElement("g",null,lO.createElement("g",null,lO.createElement("path",{fill:"#FFFFFF",d:"M1200,271.547c-23,0-41.645-18.645-41.645-41.645S1177,188.257,1200,188.257l0,0v-64.75l0,0 c-23,0-41.645-18.645-41.645-41.645S1177,40.219,1200,40.219l0,0V0h-40.22c0,22.998-18.645,41.643-41.645,41.643 c-23,0-41.645-18.645-41.645-41.643h-64.75c0,22.998-18.645,41.643-41.645,41.643S928.452,22.998,928.452,0h-64.75 c0,22.998-18.645,41.643-41.644,41.643S780.414,22.998,780.414,0h-64.75c-0.001,22.998-18.646,41.643-41.645,41.643 c-22.999,0-41.644-18.645-41.645-41.643h-64.749c0,22.998-18.645,41.643-41.645,41.643c-23,0-41.645-18.645-41.645-41.643h-64.75 c0,22.998-18.645,41.643-41.645,41.643S336.298,22.998,336.298,0h-64.75c0,22.998-18.645,41.643-41.645,41.643 c-22.998,0-41.643-18.645-41.644-41.643h-64.75c-0.001,22.998-18.646,41.643-41.645,41.643S40.222,22.998,40.221,0H0v40.219 c0.001,0,0.001,0,0.001,0c23,0,41.645,18.645,41.645,41.645s-18.645,41.645-41.645,41.645c0,0,0,0-0.001,0v64.75 c0.001,0,0.001,0,0.001,0c23,0,41.645,18.645,41.645,41.645s-18.645,41.645-41.645,41.645c0,0,0,0-0.001,0v64.75 c0.001,0,0.001,0,0.001,0c23,0,41.645,18.645,41.645,41.645s-18.645,41.645-41.645,41.645c0,0,0,0-0.001,0v64.75 c0.001,0,0.001,0,0.001,0c23,0,41.645,18.645,41.645,41.643c0,23-18.645,41.645-41.645,41.645c0,0,0,0-0.001,0v64.75 c0.001,0,0.001,0,0.001,0c23,0,41.645,18.645,41.645,41.645s-18.645,41.645-41.645,41.645c0,0,0,0-0.001,0v64.75 c0.001,0,0.001,0,0.001,0c23,0,41.645,18.645,41.645,41.645s-18.645,41.645-41.645,41.645c0,0,0,0-0.001,0v64.75 c0.001,0,0.001,0,0.001,0c23,0,41.645,18.645,41.645,41.645s-18.645,41.645-41.645,41.645c0,0,0,0-0.001,0v64.75 c0.001,0,0.001,0,0.001,0c23,0,41.645,18.645,41.645,41.645c0,22.998-18.645,41.645-41.645,41.645c0,0,0,0-0.001,0V1200h40.221 c0-0.001,0-0.001,0-0.001c0-23,18.645-41.645,41.645-41.645s41.645,18.645,41.645,41.645c0,0,0,0,0,0.001h64.75 c0-0.001,0-0.001,0-0.001c0-23,18.645-41.645,41.644-41.645c23,0,41.645,18.645,41.645,41.645c0,0,0,0,0,0.001h64.75 c0-0.001,0-0.001,0-0.001c0-23,18.645-41.645,41.645-41.645s41.645,18.645,41.645,41.645c0,0,0,0,0,0.001h64.75 c0-0.001,0-0.001,0-0.001c0-23,18.645-41.645,41.645-41.645c23,0,41.645,18.645,41.645,41.645c0,0,0,0,0,0.001h64.749 c0-0.001,0-0.001,0-0.001c0-23,18.646-41.645,41.645-41.645c23,0,41.645,18.645,41.645,41.645c0,0,0,0,0,0.001h64.75 c0-0.001,0-0.001,0-0.001c0-23,18.645-41.645,41.645-41.645c22.999,0,41.644,18.645,41.644,41.645c0,0,0,0,0,0.001h64.75 c0-0.001,0-0.001,0-0.001c0-23,18.645-41.645,41.645-41.645s41.645,18.645,41.645,41.645c0,0,0,0,0,0.001h64.75 c0-0.001,0-0.001,0-0.001c0-23,18.645-41.645,41.645-41.645c23,0,41.645,18.645,41.645,41.645c0,0,0,0,0,0.001H1200v-40.222l0,0 c-23,0-41.645-18.646-41.645-41.645c0-23,18.645-41.645,41.645-41.645l0,0v-64.75l0,0c-23,0-41.645-18.645-41.645-41.645 S1177,928.45,1200,928.45l0,0v-64.75l0,0c-23,0-41.645-18.645-41.645-41.645S1177,780.411,1200,780.411l0,0v-64.75l0,0 c-23,0-41.645-18.645-41.645-41.645S1177,632.373,1200,632.373l0,0v-64.75l0,0c-23,0-41.645-18.645-41.645-41.645 c0-22.998,18.645-41.643,41.645-41.643l0,0v-64.75l0,0c-23,0-41.645-18.645-41.645-41.645S1177,336.296,1200,336.296l0,0V271.547 L1200,271.547z"})),lO.createElement("g",null,lO.createElement("defs",null,lO.createElement("rect",{id:"SVGID_1_",x:81.956,y:81.955,width:1036.09,height:1036.09})),lO.createElement("clipPath",{id:"SVGID_00000076592278453146880290000017819136221974491042_"},lO.createElement("use",{xlinkHref:"#SVGID_1_",overflow:"visible"})),lO.createElement("g",{clipPath:"url(#SVGID_00000076592278453146880290000017819136221974491042_)"},lO.createElement("g",null,lO.createElement("path",{fill:"#FFE2A0",d:"M1118.045,81.955H81.956v849.45c176.76-126.812,248.885-189.33,312.209-404.078 c64.86-219.957,291.193-192.271,331.906-165.815c0,0,121.17,54.568,83.833,203.102c-36.977,147.1-41.376,167.188-99.739,249.859 c-62.213,88.125-65.353,146.873-65.353,146.873s-29.713-48.616-13.328-106.501c-8.055,26.26-40.452,133.922-70.636,263.199 h557.197V81.955z"}),lO.createElement("path",{fill:"#FFFFFF",d:"M633.379,848.713c0,0-0.665,2.122-1.896,6.132c-16.385,57.885,13.328,106.501,13.328,106.501 s3.14-58.748,65.353-146.873c58.363-82.671,62.762-102.759,99.739-249.859c37.337-148.534-83.833-203.102-83.833-203.102 c-40.714-26.456-267.046-54.142-331.906,165.815C330.841,742.076,258.715,804.593,81.956,931.405v186.639h478.892 c30.183-129.278,62.58-236.939,70.636-263.199C632.059,852.812,632.686,850.768,633.379,848.713z"}),lO.createElement("path",{fill:"#FFFFFF",d:"M631.483,854.845c1.23-4.011,1.896-6.132,1.896-6.132C632.686,850.768,632.059,852.812,631.483,854.845z "})),lO.createElement("path",{fill:"#FFBB11",d:"M815.117,537.943c0,0,125.878,73.14,244.874,79.807c27.606-1.398-1.536,98.017-272.812,115.88 c-136.884,3.949-207.35-55.941-143.121-84.5C708.287,620.572,784.376,593.706,815.117,537.943z"}),lO.createElement("ellipse",{transform:"matrix(0.9714 -0.2374 0.2374 0.9714 -113.9812 164.9534)",fill:"#1C304E",cx:627.872,cy:555.71,rx:23.245,ry:49.395}),lO.createElement("g",null,lO.createElement("path",{fill:"#3A53DB",d:"M353.302,527.707c0,0,10.093,39.587,26.105,47.535s100.604-93.827,196.279-130.356 S814.234,262.93,814.234,262.93s-52.149-19.568-130.436,60.713C619.703,389.371,372.252,394.783,353.302,527.707z"}),lO.createElement("path",{fill:"#2E2647",d:"M780.188,405.189c0,0,88.574-119.685,39.224-140.625c-30.913-13.117-78.949,30.273-102.445,69.991 c-17.992,30.413-28.107,40.114-28.107,40.114S748.182,364.6,780.188,405.189z"}),lO.createElement("g",null,lO.createElement("path",{fill:"#4F6AFF",d:"M654.707,298.206c-39.489-11.631-64.043-46.387-54.841-77.63c2.171-7.371,6.076-13.852,11.219-19.356 c-58.076-2.636-76.85,44.938-106.531,102.211c-47.445-8.729-108.873-8.601-159.358,5.994 c-62.907,18.186-102.949,81.867-85.93,145.099c19.331,71.823,94.036,73.181,94.036,73.181s58.546-110.765,172.099-127.995 c109.769-16.656,194.05-105.692,199.545-111.607C707.603,301.383,681.182,306.004,654.707,298.206z"}),lO.createElement("path",{fill:"#FFFFFF",d:"M725.247,287.779c0,0-15.415-66.508-91.742-83.552c-8.131-1.815-15.495-2.691-22.42-3.006 c-5.144,5.503-9.048,11.984-11.219,19.356c-9.202,31.243,15.352,65.999,54.841,77.63c26.475,7.798,52.896,3.176,70.24-10.102 C725.136,287.9,725.247,287.779,725.247,287.779z"})),lO.createElement("path",{fill:"#215EA2",d:"M428.841,376.31c7.701-4.762,15.112-9.711,22.314-14.897c7.156-5.242,14.084-10.718,20.577-16.649 l4.841-4.476l4.572-4.736c1.602-1.515,3.005-3.197,4.433-4.864l2.156-2.493c0.761-0.801,1.464-1.646,2.103-2.537 c5.6-6.831,10.152-14.359,14.716-22.227c-2.156,8.77-5.727,17.384-10.817,25.032c-5.055,7.651-11.052,14.724-17.866,20.853 c-6.846,6.087-14.215,11.559-22.11,16.111C445.885,369.975,437.594,373.87,428.841,376.31z"})))),lO.createElement("path",{fill:"#666666",d:"M52.184,891.034c-0.501-0.105-24.522-5.99-52.184-12.771V867.48c0.914,0.382,1.899,0.733,2.755,1.142 c0.618-0.772,1.258-1.576,2.081-2.609c7.15,1.809,49.031,11.415,54.142,12.476c46.582,9.549,93.453,15.238,140.131,10.994 c4.039-0.31,8.133-0.836,12.196-1.396c2.32,2.305,7.441,4.002,11.527,5.726c0.451,0.191,3.519-1.823,5.076-2.657 c-1.469-1.701-2.84-3.3-4.225-4.91c6.422-1.091,12.858-2.407,19.27-3.93c0.809-0.191,1.615-0.403,2.422-0.601 c6.287-1.551,12.568-3.249,18.831-5.252c11.67-3.664,23.244-8.196,34.818-13.597c1.481-0.649,3.049-1.39,4.538-2.131 c0.809,0.83,1.396,2.579,1.138,3.619c-0.461,1.856-1.794,3.799-3.63,5.332c-4.046,3.383-2.357,5.375,0.592,7.043 c-5.122,2.331-10.271,4.406-15.387,6.403c-2.422,0.936-4.842,1.877-7.263,2.74c-2.187,0.789-4.374,1.474-6.561,2.208 c-5.949,1.966-11.897,3.794-17.846,5.386c-2.368-1.922-5.071-3.715-7.686-5.542c-1.253,0.896-2.504,1.791-5.173,3.698 c2.095,1.34,5.781,3.698,5.781,3.698c-5.559,1.345-11.12,2.496-16.682,3.529c-2.984-0.891-8.218-0.972-12.28-1.222 c-2.144-0.131-4.487,0.597-7.025,0.975c0.847,0.896,1.52,1.811,2.519,2.639c-1.827,0.565-3.984,0.965-6.173,1.166 c-13.599,1.64-27.099,2.314-40.699,2.314c-34.238,0-68.377-4.436-102.325-11.09c-0.3-0.06-0.603-0.125-0.905-0.185 c0.816-0.493,1.419-0.981,1.442-1.362c0.153-2.371-2.421-4.795-4.951-9.026c-5.296,3.398-9.859,5.359-9.429,6.236 C51.308,889.886,51.707,890.468,52.184,891.034z M97.809,809.674c7.174,1.061,14.351,2.029,22.057,2.861 c6.741,0.727,13.489,1.276,20.238,1.716c1.732,0.114,3.465,0.219,5.197,0.311c7.004,0.376,14.01,0.645,21.018,0.661 c4.728,0,9.355,0,14.08-0.29c4.659-0.162,9.316-0.436,13.973-0.796c3.078-0.23,6.152-0.565,9.228-0.882 c1.359-0.141,2.721-0.257,4.082-0.419c3.943-0.457,7.886-1.017,11.826-1.625c0.363-0.056,0.727-0.107,1.09-0.164 c4.272-0.673,8.567-1.452,12.833-2.31c7.168,2.4,7.952,7.204,0.945,11.876c-1.535,1.022-2.048,1.812-2.058,2.448 c-7.235,1.384-14.469,2.434-21.701,3.32c-1.54,0.188-3.08,0.362-4.62,0.527c-7.119,0.771-14.239,1.39-21.355,1.719 c-4.822,0.192-17.455,0.386-17.455,0.386c-6.306,0-12.61-0.192-18.915-0.481c-1.682-0.078-3.363-0.189-5.043-0.283 c-5.007-0.289-10.012-0.643-15.016-1.093c-1.353-0.119-2.703-0.231-4.057-0.362c-13.243-1.295-26.471-3.081-39.666-5.284 c-0.235-0.292-0.552-0.585-0.772-0.879c-3.77-5.024-7.393-10.082-11.03-15.14c7.008,1.301,14.022,2.471,21.039,3.557 C95.088,809.261,96.448,809.472,97.809,809.674z M174.614,817.352c1.318,2.412,2.045,5.031,4.179,7.155 c1.231,1.222,4.642,1.805,7.265,2.328c0.851,0.17,2.315-0.768,3.583-1.231c-4.103-3.285-7.366-6.032-10.966-8.617 C178.227,816.664,176.012,817.209,174.614,817.352z M293.374,789.74c1.381,1.653,2.835,3.287,4.329,4.904 c0.275,0.298,2.595,0.304,3.372-0.035c0.815-0.355,1.523-1.407,1.225-1.952c-1.011-1.836-2.13-3.655-3.332-5.454 C297.104,788.074,295.241,788.918,293.374,789.74z M303.75,1012.062c-42.821,20.928-86.123,29.317-129.426,30.09 c-7.041,0.194-14.08,0.096-21.121-0.194c-7.811-0.192-15.719-0.675-23.532-1.349c-10.031-0.963-20.06-2.122-30.091-3.568 c-33.364-4.861-66.613-12.539-99.58-20.834v14.034c15.404,3.856,30.867,7.573,46.393,10.924c1.896,0.409,3.794,0.812,5.692,1.21 c8.509,1.784,17.039,3.489,25.578,5.003c0,0,6.836-3.816,12.259-6.845c3.32,4.235,5.883,6.065,5.919,7.892 c0.013,0.588,0.128,1.268,0.201,1.957c6.221,0.924,12.447,1.755,18.68,2.477c10.223,1.157,20.542,2.12,30.765,2.603 c7.234,0.385,14.466,0.58,21.7,0.58h2.411c7.135-0.098,14.369-0.29,21.507-0.772c39.54-2.507,79.178-11.669,118.624-30.958 c3.375-1.639,4.822-5.689,3.086-9.162C311.174,1011.772,307.124,1010.421,303.75,1012.062z M36.701,736.333 c-4.037-0.878-29.616-7.096-36.701-8.832v-14.206c17.003,4.214,35.087,8.665,37.568,9.247c11.36,2.552,22.753,4.91,34.164,7.042 c0.217,0.041,0.434,0.078,0.65,0.119c11.405,2.122,22.827,3.972,34.259,5.49c1.53,0.811,3.205,1.546,5.197,2.117 c9.997,2.854,8.218,6.023,7.032,10.026c-0.316,1.067-2.869,2.218-4.979,2.667c-0.141-0.016-1.667-0.179-1.667-0.179 c-1.105-0.542-2.519-1.691-3.379-2.495c-4.301-4.035-4.095-4.003-9.02-0.44c-0.546,0.395-1.291,0.697-2.001,1.013 c-6.681-0.974-13.36-2.078-20.028-3.26c-0.902-0.161-22-4.211-22-4.211c-1.144-2.165-3.674-2.553-6.261-1.295 C45.254,738.225,40.975,737.298,36.701,736.333z M91.751,743.983c2.927-2.128,5.856-4.257,10.169-7.397 c-4.121-0.878-7.493-1.991-8.007-1.637c-2.411,1.667-4.583,3.635-5.67,5.715C87.823,741.473,90.491,742.86,91.751,743.983z M274.054,736.297c5.965-2.027,11.931-4.266,18.026-6.779c2.335-2.821-0.657-4.42-4.171-6.796 c-0.421-0.284-0.854-0.567-1.287-0.851c-0.768-0.098-1.518-0.176-2.3-0.295c-4.621,0.98-14.255,2.135-14.165,3.151 c0.591,6.699-10.495,10.609-14.065,16.155c-0.164,0.254-0.192,0.595-0.15,0.956C261.851,740.224,267.76,738.416,274.054,736.297z M300.645,724.532c-0.678-0.267-1.204-0.541-2.002-0.802c-4.277-1.395-7.275-4.837-9.417-7.855 c-2.446,1.032-4.903,1.964-7.351,2.92c1.576,1.034,3.187,2.054,4.746,3.078c5.335,0.67,10.239,0.944,12.958,2.245 C299.856,724.248,300.256,724.389,300.645,724.532z M300.645,724.532c0.44,0.158,0.867,0.347,1.391,0.518 C301.633,724.869,301.1,724.711,300.645,724.532z M218.062,749.66c4.614-0.669,9.228-1.458,13.84-2.338 c0.377-0.072,0.754-0.141,1.132-0.216c4.646-0.903,9.307-1.909,13.952-3.03c-0.781-2.51-2.541-4.863-6.871-6.776 c2.598-2.349,1.89-4.113,0.198-5.709c-4.657,1.055-9.319,1.957-13.982,2.782c-0.319,0.056-0.638,0.128-0.957,0.182 c-4.839,0.842-9.706,1.552-14.55,2.161c1.918,3.957,3.868,7.911,5.984,11.833C216.994,748.891,217.483,749.278,218.062,749.66z M255.326,727.807c-0.419,0.12-0.87,0.263-1.29,0.379c0.298,0.209,0.614,0.413,0.898,0.627 C255.073,728.476,255.182,728.143,255.326,727.807z M159.972,753.232c2.405,0.045,11.65,0.077,11.65,0.077 c4.529-0.059,9.06-0.261,13.59-0.479c-7.231-3.154-14.977-5.955-20.133-10.398c-3.758-3.24-4.619-0.027-5.527,1.573 c-0.567,1.002-1.52,2.335-0.881,3.108C160.79,749.672,160.879,751.635,159.972,753.232z M39.69,798.731 c-0.518-0.116-1.971-0.467-4.127-0.996c0.943,2.182,4.704,11.041,5.546,15.303c0.131,0.03,0.307,0.071,0.416,0.095 c1.059-1.277,1.77-2.14,2.434-2.944c2.876,1.767,5.752,3.534,8.627,5.299c7.314,1.533,14.637,2.986,21.976,4.316 c-3.82-5.371-7.603-10.748-11.315-16.146C55.388,802.105,47.534,800.477,39.69,798.731z M274.044,948.892 c-3.843,1.399-7.648,2.537-11.463,3.706c0.742,0.343,1.48,0.699,2.24,1.002c-3.426,0.573-6.853,1.145-12.514,1.937 c-14.317,3.912-28.681,6.659-43.053,8.414c-0.599,0.074-1.197,0.15-1.794,0.219c-18.834,2.193-37.701,2.734-56.572,1.96 c-0.925-0.038-1.848-0.074-2.773-0.116c-4.498-0.215-8.996-0.478-13.493-0.83c-0.43,0.768-2.062,1.812-2.929,2.679 c-2.45-1.044-6.552-1.924-6.869-3.527c-7.871-0.778-15.738-1.682-23.602-2.81c-6.076-0.87-12.152-1.833-18.229-2.894 c-6.654-1.061-13.211-2.314-19.867-3.665c-8.294-1.64-16.588-3.375-24.883-5.207c-0.203-0.047-0.403-0.099-0.606-0.146 c0.672,1.503,3.357,7.89,3.892,14.795c1.863,0.413,3.721,0.861,5.587,1.264c8.584,1.832,17.167,3.568,25.848,5.112 c6.75,1.253,13.597,2.41,20.35,3.471c6.267,0.965,12.541,1.886,18.806,2.603c18.337,2.099,36.648,3.471,55.068,3.471 c2.3,0,4.602-0.074,6.901-0.114c-1.399-3.465-2.63-6.974-3.053-10.527c-0.11-0.929,4.996-2.666,8.005-3.165 c1.709-0.284,5.838,1.198,5.804,1.866c-0.204,3.855-0.747,7.706-1.377,11.556c14.231-0.603,28.486-2.068,42.748-4.495 c0.843-0.143,1.688-0.279,2.532-0.431c6.604-1.178,13.208-2.583,19.813-4.22c1.047-0.26,2.096-0.552,3.145-0.825 c6.741-1.746,13.481-3.673,20.217-5.943c5.304-1.736,10.706-3.664,16.106-5.883c7.233-2.797,14.467-5.979,21.699-9.547 c3.375-1.639,4.822-5.691,3.086-9.066c-1.64-3.375-5.69-4.822-9.065-3.183C293.911,941.178,283.979,945.325,274.044,948.892z"}))),_B=window.React.useContext,SB=window.React.useEffect,kB=window.React.useState,EB=()=>Mn.jsx(Mn.Fragment,{children:Mn.jsx("h4",{className:XD,children:__("Send Email","yaymail")})}),$B=({usingWooFunc:e,template:t,orderId:n})=>{const[i,o]=kB(window.yaymailData.test_email_address),[r,a]=kB(!1),[s,l]=kB(!1),c=hM((e=>{var t;return null==(t=e.templateData)?void 0:t.name})),{selectedOrderID:u}=_B(hA),d=hM((e=>e.isReviewed)),h=hM((e=>e.setIsReviewed)),[p,m]=sw.useNotification({maxCount:1}),f=(e,t)=>{p[e]({message:t,placement:"bottomRight",duration:3})};return Mn.jsxs(Mn.Fragment,{children:[m,Mn.jsxs("div",{className:"yaymail-send-email",children:[Mn.jsx("h4",{children:__("Email address for testing","yaymail")}),Mn.jsxs("div",{className:"yaymail-send-email__content",children:[Mn.jsx(bb,{type:"email",className:"yaymail-send-email__content__text",placeholder:"Ex: help.yaycommerce@gmail.com",value:i,onChange:e=>o(e.target.value)}),Mn.jsx(Ct,{className:"yaymail-send-email__content__btn-send",type:"primary",loading:s,onClick:async()=>{try{l(!0),a(!1);const o=e?await uE(t??c,n??u,i):await async function(e,t,n){try{const i=await window.jQuery.ajax({type:"POST",url:window.yaymailData.admin_ajax.url,data:{action:"yaymail_send_test_mail",nonce:window.yaymailData.admin_ajax.nonce,template_name:e||"",email:n,order_id:t}});if(!i.success)throw new Error("Call ajax failed");return window.yaymailData.test_email_address=i.data.email,i}catch(i){throw console.error(i),i}}(t??c,n??u,i);o.success?(l(!1),a(!0),f("success","Send mail success")):(l(!1),f("error","Send mail failed"))}catch(o){l(!1),f("error","Send mail failed"),console.error(o)}},children:"Send Email"},"ok")]}),r&&Mn.jsxs(Mn.Fragment,{children:[Mn.jsxs("p",{className:"yaymail-send-email__success",children:[Mn.jsx("i",{className:"yaymail-send-email__success__icon",children:Mn.jsx(xB,{})}),Mn.jsxs("span",{children:[Mn.jsx("span",{children:"Yay! Email sent successfully. "}),Mn.jsx("a",{target:"_blank",href:"https://mail.google.com/",className:"yaymail-link-gmail",rel:"noreferrer",children:"Open mailbox"})]})]}),!window.yaymailData.reviewed&&(d?Mn.jsx("p",{className:"yaymail-send-email__success",children:Mn.jsx("span",{className:"yaymail-footer-review-text",children:__("Thank you for using YayMail.","yaymail")})}):Mn.jsx("p",{className:"yaymail-send-email__success",children:Mn.jsxs("span",{className:"yaymail-footer-review-text",children:[__("Are you happy with YayMail? You can give a review to motivate our developers","yaymail"),Mn.jsxs("svg",{style:{transform:"translateY(2px)"},width:"15",height:"15",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Mn.jsx("path",{d:"M40.0001 70.4762C56.8316 70.4762 70.4763 56.8315 70.4763 40C70.4763 23.1685 56.8316 9.5238 40.0001 9.5238C23.1686 9.5238 9.52393 23.1685 9.52393 40C9.52393 56.8315 23.1686 70.4762 40.0001 70.4762Z",fill:"url(#paint0_radial)"}),Mn.jsx("path",{opacity:"0.5",d:"M40.0001 70.4762C56.8316 70.4762 70.4763 56.8315 70.4763 40C70.4763 23.1685 56.8316 9.5238 40.0001 9.5238C23.1686 9.5238 9.52393 23.1685 9.52393 40C9.52393 56.8315 23.1686 70.4762 40.0001 70.4762Z",fill:"url(#paint1_radial)"}),Mn.jsx("path",{opacity:"0.5",d:"M40.0001 70.4762C56.8316 70.4762 70.4763 56.8315 70.4763 40C70.4763 23.1685 56.8316 9.5238 40.0001 9.5238C23.1686 9.5238 9.52393 23.1685 9.52393 40C9.52393 56.8315 23.1686 70.4762 40.0001 70.4762Z",fill:"url(#paint2_radial)"}),Mn.jsx("path",{opacity:"0.5",d:"M40.0001 70.4762C56.8316 70.4762 70.4763 56.8315 70.4763 40C70.4763 23.1685 56.8316 9.5238 40.0001 9.5238C23.1686 9.5238 9.52393 23.1685 9.52393 40C9.52393 56.8315 23.1686 70.4762 40.0001 70.4762Z",fill:"url(#paint3_radial)"}),Mn.jsx("path",{d:"M40 60.2665C31.219 60.2665 28.419 50.857 31.0857 52.3237C34.6667 54.3046 36.9524 54.4951 40 54.4951C43.0476 54.4951 45.3143 54.3046 48.9143 52.3237C51.5809 50.857 48.7809 60.2665 40 60.2665Z",fill:"#643800"}),Mn.jsx("path",{d:"M48.9144 52.3238C45.3335 54.3048 43.0478 54.4952 40.0001 54.4952C36.9525 54.4952 34.6859 54.3048 31.0859 52.3238C30.1525 51.8095 29.8859 52.6095 30.3049 53.8857C30.3049 53.8667 30.4382 52.4952 31.6954 53.4476C31.6954 53.4476 36.324 56.2286 39.9811 56.2286C43.6382 56.2286 48.2668 53.4476 48.2668 53.4476C49.5239 52.5143 49.6573 53.8667 49.6573 53.8857C50.1144 52.6095 49.8478 51.8095 48.9144 52.3238Z",fill:"url(#paint4_linear)"}),Mn.jsx("path",{d:"M33.3525 28.8761C33.5239 27.6571 32.3049 26.7238 30.0573 26.4381C28.1335 26.1714 23.8097 26.6666 20.4001 30C19.7716 30.6095 20.5525 31.1047 21.124 30.7238C23.1049 29.4476 28.1335 28.1523 31.7906 29.0476C33.2763 29.4285 33.3525 28.8761 33.3525 28.8761Z",fill:"url(#paint5_linear)"}),Mn.jsx("path",{d:"M46.6478 28.8761C46.4763 27.657 47.6954 26.7237 49.943 26.438C51.8668 26.1903 56.1906 26.6665 59.6002 29.9999C60.2287 30.6094 59.4478 31.1046 58.8764 30.7237C56.8954 29.4475 51.8668 28.1523 48.2097 29.0475C46.724 29.4284 46.6478 28.8761 46.6478 28.8761Z",fill:"url(#paint6_linear)"}),Mn.jsx("path",{d:"M52.6287 36.3045C52.6287 36.3045 57.6572 37.1807 58.7811 41.1045C58.8572 41.3522 58.8763 41.6188 58.8572 41.8664C58.8191 42.3807 58.3049 42.876 57.4477 42.3236C52.1144 38.876 48.8192 40.076 46.362 40.9141C45.4096 41.2379 44.6477 40.2283 44.9906 39.4283C45.0858 39.1998 45.162 38.9522 45.3144 38.7426C47.6001 35.4093 52.6287 36.3045 52.6287 36.3045Z",fill:"url(#paint7_radial)"}),Mn.jsx("path",{d:"M52.4193 37.5046C52.4193 37.5046 56.5145 38.2094 58.8383 41.5618C58.8193 41.4094 58.8002 41.257 58.7621 41.1046C57.6383 37.1808 52.6097 36.3046 52.6097 36.3046C52.6097 36.3046 47.6002 35.4094 45.2764 38.7237C45.1812 38.857 45.124 38.9903 45.0669 39.1237C48.3431 36.7618 52.4193 37.5046 52.4193 37.5046Z",fill:"url(#paint8_linear)"}),Mn.jsx("path",{d:"M27.3714 36.3045C27.3714 36.3045 22.3429 37.1807 21.219 41.1045C21.1429 41.3522 21.1238 41.6188 21.1429 41.8664C21.181 42.3807 21.6952 42.876 22.5524 42.3236C27.8857 38.876 31.1809 40.076 33.6381 40.9141C34.5905 41.2379 35.3524 40.2283 35.0095 39.4283C34.9143 39.1998 34.8381 38.9522 34.6857 38.7426C32.4 35.4093 27.3714 36.3045 27.3714 36.3045Z",fill:"url(#paint9_radial)"}),Mn.jsx("path",{d:"M27.5809 37.5046C27.5809 37.5046 23.4857 38.2094 21.1619 41.5618C21.1809 41.4094 21.2 41.257 21.2381 41.1046C22.3619 37.1808 27.3904 36.3046 27.3904 36.3046C27.3904 36.3046 32.4 35.4094 34.7238 38.7237C34.819 38.857 34.8762 38.9903 34.9333 39.1237C31.6571 36.7618 27.5809 37.5046 27.5809 37.5046Z",fill:"url(#paint10_linear)"}),Mn.jsxs("defs",{children:[Mn.jsxs("radialGradient",{id:"paint0_radial",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(34.0039 27.649) scale(36.7656)",children:[Mn.jsx("stop",{"stop-color":"#FFE030"}),Mn.jsx("stop",{offset:"1","stop-color":"#FFB92E"})]}),Mn.jsxs("radialGradient",{id:"paint1_radial",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(34.0039 27.649) scale(28.9251)",children:[Mn.jsx("stop",{"stop-color":"#FFEA5F"}),Mn.jsx("stop",{offset:"1","stop-color":"#FFBC47","stop-opacity":"0"})]}),Mn.jsxs("radialGradient",{id:"paint2_radial",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(23.3965 47.5816) rotate(-2.7703) scale(12.819 10.143)",children:[Mn.jsx("stop",{"stop-color":"#FF4C00"}),Mn.jsx("stop",{offset:"0.1542","stop-color":"#FF4C00"}),Mn.jsx("stop",{offset:"0.1795","stop-color":"#FF4C00"}),Mn.jsx("stop",{offset:"0.3996","stop-color":"#FB4C0B","stop-opacity":"0.7318"}),Mn.jsx("stop",{offset:"0.7799","stop-color":"#EF4B27","stop-opacity":"0.2683"}),Mn.jsx("stop",{offset:"1","stop-color":"#E74A3A","stop-opacity":"0"})]}),Mn.jsxs("radialGradient",{id:"paint3_radial",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(56.5951 47.5816) rotate(-177.23) scale(12.819 10.143)",children:[Mn.jsx("stop",{"stop-color":"#FF4C00"}),Mn.jsx("stop",{offset:"0.1542","stop-color":"#FF4C00"}),Mn.jsx("stop",{offset:"0.1795","stop-color":"#FF4C00"}),Mn.jsx("stop",{offset:"0.3996","stop-color":"#FB4C0B","stop-opacity":"0.7318"}),Mn.jsx("stop",{offset:"0.7799","stop-color":"#EF4B27","stop-opacity":"0.2683"}),Mn.jsx("stop",{offset:"1","stop-color":"#E74A3A","stop-opacity":"0"})]}),Mn.jsxs("linearGradient",{id:"paint4_linear",x1:"39.9997",y1:"48.8487",x2:"39.9997",y2:"56.0166",gradientUnits:"userSpaceOnUse",children:[Mn.jsx("stop",{offset:"0.00132565","stop-color":"#3C2200"}),Mn.jsx("stop",{offset:"1","stop-color":"#512D00"})]}),Mn.jsxs("linearGradient",{id:"paint5_linear",x1:"26.7086",y1:"30.0508",x2:"27.1357",y2:"26.868",gradientUnits:"userSpaceOnUse",children:[Mn.jsx("stop",{offset:"0.00132565","stop-color":"#3C2200"}),Mn.jsx("stop",{offset:"1","stop-color":"#7A4400"})]}),Mn.jsxs("linearGradient",{id:"paint6_linear",x1:"53.2907",y1:"30.0509",x2:"52.8636",y2:"26.8681",gradientUnits:"userSpaceOnUse",children:[Mn.jsx("stop",{offset:"0.00132565","stop-color":"#3C2200"}),Mn.jsx("stop",{offset:"1","stop-color":"#7A4400"})]}),Mn.jsxs("radialGradient",{id:"paint7_radial",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(52.1362 39.13) rotate(9.98082) scale(5.47711 2.64266)",children:[Mn.jsx("stop",{offset:"0.00132565","stop-color":"#7A4400"}),Mn.jsx("stop",{offset:"1","stop-color":"#643800"})]}),Mn.jsxs("linearGradient",{id:"paint8_linear",x1:"52.9287",y1:"34.7224",x2:"52.3353",y2:"38.2109",gradientUnits:"userSpaceOnUse",children:[Mn.jsx("stop",{offset:"0.00132565","stop-color":"#3C2200"}),Mn.jsx("stop",{offset:"1","stop-color":"#512D00"})]}),Mn.jsxs("radialGradient",{id:"paint9_radial",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(27.9428 39.0431) rotate(170.019) scale(5.47711 2.64266)",children:[Mn.jsx("stop",{offset:"0.00132565","stop-color":"#7A4400"}),Mn.jsx("stop",{offset:"1","stop-color":"#643800"})]}),Mn.jsxs("linearGradient",{id:"paint10_linear",x1:"27.0206",y1:"34.6925",x2:"27.614",y2:"38.1811",gradientUnits:"userSpaceOnUse",children:[Mn.jsx("stop",{offset:"0.00132565","stop-color":"#3C2200"}),Mn.jsx("stop",{offset:"1","stop-color":"#512D00"})]})]})]}),Mn.jsx(Z_,{target:"_blank",to:"https://wordpress.org/support/plugin/yaymail/reviews/",onClick:async()=>{try{h(!0),await dE()}catch(e){console.error(e)}},style:{marginLeft:"5px",verticalAlign:"bottom",textDecoration:"underline"},children:__("Rate now","yaymail")})]})}))]})]})]})},MB=()=>Mn.jsx(Mn.Fragment,{children:Mn.jsxs("div",{children:[Mn.jsx("span",{children:"YaySMTP installed successfully."}),Mn.jsx("a",{href:window.yaymailData.smtp.setting,target:"blank",children:"Get started!"})]})}),RB=()=>{const[e,t]=kB(!1),[n,i]=kB(window.yaymailData.smtp.is_active),[o,r]=sw.useNotification({maxCount:1}),a=(e,t)=>{o[e]({message:t,placement:"bottomRight",duration:5,className:"yaymail-recommend__smtp__notifications"})};return SB((()=>{const e=new MutationObserver((e=>{for(const t of e)if("childList"===t.type){const e=document.getElementById("TB_window");e&&e.classList.add("plugin-details-modal")}}));return e.observe(document.body,{childList:!0,subtree:!0}),()=>{e.disconnect()}}),[]),Mn.jsxs(Mn.Fragment,{children:[r,!n&&Mn.jsxs("div",{className:"yaymail-recommend-content",children:[Mn.jsx("h4",{children:__("To send emails to inbox, we recommend:","yaymail")}),Mn.jsxs("div",{className:"yaymail-recommend",children:[Mn.jsx("div",{className:"yaymail-recommend__smtp__img",children:Mn.jsx(CB,{})}),Mn.jsxs("div",{className:"yaymail-recommend__smtp",children:[Mn.jsx("h2",{className:"yaymail-recommend__smtp__title",children:"YaySMTP – Simple WP SMTP Mail"}),Mn.jsxs("div",{className:"yaymail-recommend__smtp__action",children:[Mn.jsx("a",{className:"yaymail-recommend__smtp__detail button button thickbox open-plugin-details-modal",target:"_blank",href:window.yaymailData.smtp.link_detail,rel:"noreferrer",children:"Details"}),Mn.jsx(Ct,{className:"yaymail-recommend__smtp__btn-install button button-primary",type:"primary",loading:e,onClick:async()=>{try{t(!0),(await async function(){try{const e=await window.jQuery.ajax({type:"POST",url:window.yaymailData.admin_ajax.url,data:{action:"yaymail_install_yaysmtp",nonce:window.yaymailData.admin_ajax.nonce,template_name:"",email:void 0,order_id:void 0}});if(!e.success)throw new Error("Call ajax failed");return e.data.installed&&(window.yaymailData.smtp.is_active=!0),e}catch(e){throw console.error(e),e}}()).success?(t(!1),i(!0),a("success",Mn.jsx(MB,{}))):(t(!1),a("error","Installed failed"))}catch(e){t(!1),a("error","Installed failed"),console.error(e)}},children:"Free Install Now"},"ok")]})]})]})]})]})},AB=({isOpen:e,onClose:t,...n})=>Mn.jsx(Mn.Fragment,{children:Mn.jsx(Gb,{title:Mn.jsx(tH,{content:Mn.jsx(EB,{})}),className:"yaymail-global__modal yaymail-send-test-mail__modal",open:e,onCancel:t,centered:!0,width:"500px",footer:null,destroyOnClose:!0,children:Mn.jsxs("div",{className:"modal__content",children:[Mn.jsx($B,{...n}),!window.yaymailData.smtp.is_active&&Mn.jsx(RB,{})]})})}),OB=window.React.useState,jB=()=>{const e=hM((e=>{var t;return"already_supported"===(null==(t=e.templateData)?void 0:t.support_status)})),[t,n]=OB(!1),i=()=>{n(!0)};return Mn.jsxs("div",{className:"header__btn--action",children:[Mn.jsx(Ct,{onClick:i,disabled:!e,children:__("Send test email","yaymail")}),e&&Mn.jsx(AB,{isOpen:t,onOpen:i,onClose:()=>{n(!1)}})]})},TB=e=>lO.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("g",{clipPath:"url(#clip0_542_603)"},lO.createElement("path",{d:"M8.88232 1.07594C8.97855 0.673128 9.38279 0.424115 9.78564 0.520275C10.1882 0.61655 10.4371 1.02099 10.3413 1.4236L7.11864 14.9226C7.02251 15.3254 6.61806 15.5741 6.21532 15.4783C5.81252 15.3821 5.56366 14.9778 5.65966 14.575L8.88232 1.07594ZM3.48485 4.05348C3.7738 3.80621 4.20878 3.81354 4.48974 4.0818C4.78868 4.36785 4.79983 4.84197 4.51415 5.14137L1.78564 7.99781L4.51415 10.8552L4.56396 10.9138C4.79702 11.2139 4.77045 11.6477 4.48974 11.9158C4.20896 12.1838 3.77378 12.1909 3.48485 11.9441L3.42919 11.8914L0.207511 8.51637C-0.0691977 8.22656 -0.069143 7.77008 0.207511 7.48024L3.42919 4.10621L3.48485 4.05348ZM11.5083 4.0818C11.7892 3.81364 12.2233 3.80648 12.5122 4.05348L12.5679 4.10621L15.7905 7.48024C16.0669 7.77007 16.0671 8.22664 15.7905 8.51637L12.5679 11.8914L12.5122 11.9441C12.2234 12.1907 11.7891 12.1834 11.5083 11.9158C11.2087 11.6298 11.1979 11.1548 11.4839 10.8552L14.2104 7.99781L11.4839 5.14137L11.4331 5.08375C11.1997 4.78374 11.2275 4.34998 11.5083 4.0818Z",fill:"currentColor"})),lO.createElement("defs",null,lO.createElement("clipPath",{id:"clip0_542_603"},lO.createElement("rect",{width:16,height:16,fill:"white"})))),NB=window.React.useMemo,LB=window.React.useState,IB=({searchText:e,onChangeSearchText:t})=>Mn.jsxs(Mn.Fragment,{children:[Mn.jsx("h4",{className:XD,children:"Shortcodes"}),Mn.jsx("div",{className:JD,children:Mn.jsx(bb,{type:"text",className:"modal__header--search",placeholder:"Search",suffix:Mn.jsx(sD,{}),value:e,onChange:e=>{t(e.target.value)}})})]}),DB=({isOpen:e,onClose:t})=>{const[n,i]=Vb.useMessage({top:30,duration:1}),[o,r]=LB(""),a=hM((e=>e.shortcodes)),s=NB((()=>{const e=o.toLowerCase();return a.filter((t=>t.name.toLowerCase().includes(e)||t.description.toLowerCase().includes(e)))}),[o,a]),l=NB((()=>Object.values(v$(s))),[s]);return Mn.jsxs(Mn.Fragment,{children:[i,Mn.jsx(Gb,{title:Mn.jsx(tH,{content:Mn.jsx(IB,{searchText:o,onChangeSearchText:r})}),className:"yaymail-global__modal yaymail-shortcodes-information__modal",open:e,onCancel:()=>{r(""),t()},footer:null,width:800,centered:!0,destroyOnClose:!0,children:l.length>0?l.map((({shortcodes:e,groupLabel:t},i)=>Mn.jsxs("div",{className:"modal__content__shortcode-group",children:[Mn.jsxs("h4",{className:"modal__content__shortcode-group__title",children:[t," :"]}),Mn.jsx("table",{className:"modal__content__shortcode-group__table",children:Mn.jsx("tbody",{children:e.map(((e,t)=>{const i=((e,t)=>{if(!t)return`[${e}]`;const n=e.includes("yaymail_order_meta:");return`[${e}${Object.entries(t).filter((([,e])=>!n||e)).map((([e,t])=>` ${e}="${t}"`)).join("")}]`})(e.name,e.attributes);return Mn.jsxs("tr",{className:"shortcode-item",children:[Mn.jsx("td",{className:"shortcode-item__name",onClick:(o=i,()=>{n.success("Shortcode copied"),nx(o,{format:"text/plain"})}),children:Mn.jsx("span",{dangerouslySetInnerHTML:{__html:i}})}),Mn.jsxs("td",{className:"shortcode-item__description",children:["- ",e.description]})]},t);var o}))})})]},i))):Mn.jsx("div",{className:"yaymail-shortcodes-information__modal__empty",children:Mn.jsx(kn,{description:"No shortcode found"})})})]})},HB=window.React.useState,PB=()=>{const e=hM((e=>{var t;return"already_supported"===(null==(t=e.templateData)?void 0:t.support_status)})),[t,n]=HB(!1),i=()=>{n(!0)};return Mn.jsxs("div",{className:"header__btn--action",children:[Mn.jsx(he,{placement:"bottom",title:"Shortcodes",children:Mn.jsx(Ct,{onClick:i,disabled:!e,className:"yaymail-btn--icon-only",children:Mn.jsx("span",{className:"anticon",style:{display:"flex"},children:Mn.jsx(TB,{})})})}),Mn.jsx(DB,{isOpen:t,onOpen:i,onClose:()=>{n(!1)}})]})},zB=e=>lO.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("path",{d:"M12.9355 2.17763C12.6458 1.93183 12.2115 1.94009 11.9316 2.20888C11.6518 2.47807 11.6258 2.91261 11.8603 3.21181L11.9101 3.26943L12.7441 4.13564L5.4951 4.17861V4.17958C2.84776 4.1823 0.750105 6.40789 0.749978 9.08876C0.750142 11.7713 2.85039 13.9989 5.49998 13.9989H11.9004L11.9765 13.995C12.3546 13.9566 12.6502 13.6371 12.6504 13.2489C12.6502 12.8608 12.3546 12.5412 11.9765 12.5028L11.9004 12.4989H5.49998C3.73381 12.4989 2.25014 10.9989 2.24998 9.08876C2.2501 7.17858 3.73379 5.67861 5.49998 5.67861H5.50388L12.7324 5.63564L11.9101 6.49013C11.6233 6.78874 11.6331 7.26369 11.9316 7.55068C12.2302 7.83737 12.7052 7.82851 12.9922 7.53017L15.04 5.39931C15.3187 5.10909 15.3187 4.65048 15.04 4.36025L12.9922 2.23037L12.9355 2.17763Z",fill:"currentColor"})),FB=e=>lO.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("path",{d:"M3.0635 2.17763C3.35319 1.93183 3.78751 1.94009 4.0674 2.20888C4.34725 2.47807 4.3732 2.91261 4.13869 3.21181L4.08889 3.26943L3.2549 4.13564L10.5039 4.17861V4.17958C13.1513 4.1823 15.2489 6.40789 15.249 9.08876C15.2489 11.7713 13.1486 13.9989 10.499 13.9989H4.09865L4.02248 13.995C3.64441 13.9566 3.34881 13.6371 3.34865 13.2489C3.34883 12.8608 3.64442 12.5412 4.02248 12.5028L4.09865 12.4989H10.499C12.2652 12.4989 13.7489 10.9989 13.749 9.08876C13.7489 7.17858 12.2652 5.67861 10.499 5.67861H10.4951L3.26662 5.63564L4.08889 6.49013C4.37569 6.78874 4.3659 7.26369 4.0674 7.55068C3.76884 7.83737 3.29384 7.82851 3.00686 7.53017L0.959006 5.39931C0.680325 5.10909 0.680338 4.65048 0.959006 4.36025L3.00686 2.23037L3.0635 2.17763Z",fill:"currentColor"})),VB=window.React.useEffect,BB=window.React.useMemo,WB=()=>{const e=X$((e=>e.hasUndo)),t=X$((e=>e.hasRedo)),n=X$((e=>e.undo)),i=X$((e=>e.redo)),o=BB((()=>(()=>{let e="window";return-1!=window.navigator.userAgent.indexOf("Mac")&&(e="mac"),e})()),[]);VB((()=>{const e=e=>{let t=null;("window"===o&&e.ctrlKey||"mac"===o&&e.metaKey)&&("z"!==e.key.toLowerCase()||e.shiftKey||(t="undo"),"z"===e.key.toLowerCase()&&e.shiftKey&&(t="redo")),null!=t&&("undo"==t&&n(),"redo"==t&&i())};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}}),[n,i,o]);const r=BB((()=>{let e="(Ctrl + Z)";return"mac"===o&&(e="(⌘ + Z)"),`${__("Undo","yaymail")} ${e}`}),[o]),a=BB((()=>{let e="(Ctrl + Shift + Z)";return"mac"===o&&(e="(⌘ + Shift + Z)"),`${__("Redo","yaymail")} ${e}`}),[o]),s=hM((e=>{var t;return"already_supported"===(null==(t=e.templateData)?void 0:t.support_status)}));return Mn.jsxs(Mn.Fragment,{children:[Mn.jsx("div",{className:"header__btn--action",children:Mn.jsx(he,{placement:"bottom",title:r,children:Mn.jsx(Ct,{disabled:!e||!s,onClick:n,children:Mn.jsx("span",{className:"anticon",style:{display:"flex"},children:Mn.jsx(FB,{})})})})}),Mn.jsx("div",{className:"header__btn--action",children:Mn.jsx(he,{placement:"bottom",title:a,children:Mn.jsx(Ct,{disabled:!t||!s,onClick:i,children:Mn.jsx("span",{className:"anticon",style:{display:"flex"},children:Mn.jsx(zB,{})})})})})]})},UB=window.React.useCallback,YB=window.React.useMemo,ZB=window.React.useState;function GB(){const e=cE((e=>e.settings)),[t,n]=sw.useNotification({maxCount:1}),i=cE((e=>e.updateSettings)),[o,r]=ZB(!1),a=YB((()=>(null==e?void 0:e.global_header_footer_enabled)??!1),[e]),s=(e,n)=>{t[e]({message:n,placement:"bottomRight",duration:3})},l=UB((async e=>{r(!0);const t=await async function(e){return(await KR("/templates/global-header-footer/change-status",{status:e})).data}(e);r(!1),t?(setTimeout((()=>{i({global_header_footer_enabled:e})}),10),s("success",__("Global header/footer is ","yaymail")+__(e?"enabled":"disabled","yaymail"))):s("error",__("Change status failed","yaymail"))}),[]);return Mn.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[n,Mn.jsx(he,{title:__("%s global header/footer","yaymail").replace("%s",__(a?"Disable":"Enable","yaymail")),children:Mn.jsx(ww,{id:"yaymail-global-header-footer-toggle",checked:a,onChange:l,loading:o})})]})}const qB=window.React.memo,KB=window.React.useContext,QB=qB((()=>{const{hasTemplateSelector:e,hasOrderSelector:t,hasTemplateImporter:n,hasActivationButton:i,hasSendTestMailButton:o}=KB(bA),r=hM((e=>e.currentTemplate));return Mn.jsxs("section",{className:"yaymail-email-customizer__header",children:[Mn.jsxs("div",{className:"yaymail-email-customizer__header--left",children:[e&&Mn.jsx(wB,{}),t&&Mn.jsx(vB,{}),Mn.jsxs("div",{className:"header__actions",children:[Mn.jsx(PB,{}),Mn.jsx(TV,{}),n&&Mn.jsx(BV,{}),Mn.jsx(cB,{}),Mn.jsx(WB,{})]})]}),Mn.jsxs("div",{className:"yaymail-email-customizer__header--right",children:["yaymail_global_header_footer"===r&&Mn.jsx(XB,{}),Mn.jsx(nB,{}),o&&Mn.jsx(jB,{}),i&&Mn.jsx(IV,{}),Mn.jsx(fB,{hasLoading:!0,savingText:""})]})]})}));function XB(){const e=cE((e=>{var t;return(null==(t=e.settings)?void 0:t.global_header_footer_enabled)??!1})),t=hM((e=>e.setTourMode));return Mn.jsxs(Mn.Fragment,{children:[Mn.jsx(Ct,{onClick:()=>{t(!0)},children:"Guidance"}),Mn.jsx(Jn,{message:Mn.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[__("Global header/footer is %1s","yaymail").replace("%1s",__(e?"ON":"OFF","yaymail"))+(e?".":__(", please %2s it globally.","yaymail").replace("%2s",__(e?"disable":"enable","yaymail"))),Mn.jsx(GB,{})]}),type:"info",showIcon:!0})]})}const JB=window.React.useContext,eW=window.React.useMemo,tW=()=>{const{isPageFetching:e}=JB(bA),{isTemplateExist:t}=CA(),n=hM((e=>{var t;return(null==(t=e.templateData)?void 0:t.background_color)??"transparent"})),i=hM((e=>{var t;return(null==(t=e.templateData)?void 0:t.text_link_color)??window.yaymailData.colors.default_text_link_color})),o=eW((()=>({backgroundColor:n||"transparent"})),[n]);return _A(),Mn.jsxs(Mn.Fragment,{children:[Mn.jsx("style",{children:`\n .yaymail-customizer-template-section a:not([role="button"]) {\n color: ${i};\n }\n `}),Mn.jsx(QB,{}),Mn.jsx("main",{style:o,className:`yaymail-customizer-template-section ${!t&&"yaymail-customizer-template-section__not-found"}`,children:t?Mn.jsx(kV,{}):!e&&Mn.jsx(kn,{description:__("Template not found","yaymail")})})]})},nW=window.React.useEffect,iW=window.React.useMemo,oW=({isCrossPage:e})=>{h_();const t=iW((()=>[__("Get recent editing revisions","yaymail"),__("Custom fields & meta support","yaymail"),__("Save custom blocks for reuse","yaymail"),__("%s plugin integrations","yaymail").replace("%s",``+__("30+ third-party","yaymail")+""),__("Multilingual support","yaymail"),__("Fast updates","yaymail"),__("VIP live chat support","yaymail")]),[e]);return nW((()=>{function e(){var e;window.jQuery("html, body").animate({scrollTop:(null==(e=window.jQuery("#third-party-integrations").offset())?void 0:e.top)??0})}return window.jQuery(document).on("click","#view-third-party-integrations",e),()=>{window.jQuery(document).off("click","#view-third-party-integrations",e)}}),[]),Mn.jsx("div",{className:"upgrade-content-container",children:Mn.jsxs("div",{className:"upgrade-content__main",children:[Mn.jsxs("div",{className:"upgrade-content__header",children:[Mn.jsxs("div",{className:"upgrade-content__header-title",children:[Mn.jsx("h2",{children:__("YayMail Pro!","yaymail")}),Mn.jsxs("span",{className:"upgrade-content__header-title__badge",children:[Mn.jsx(cI,{}),__("Pro","yaymail")]})]}),Mn.jsx("p",{className:"upgrade-content__subtitle",children:__("Get all features when you upgrade to YayMail Pro.","yaymail")})]}),Mn.jsx("div",{className:"upgrade-content__features",children:Mn.jsx("div",{className:"upgrade-content__feature-group",children:Mn.jsx("ul",{className:"upgrade-content__feature-list",children:t.map(((e,t)=>Mn.jsxs("li",{className:"upgrade-content__feature-item",children:[Mn.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Mn.jsx("circle",{cx:"11",cy:"11",r:"11",fill:"#FEF5DA"}),Mn.jsx("path",{d:"M6 12L8.72727 15L16 7",fill:"#FEF5DA"}),Mn.jsx("path",{d:"M6 12L8.72727 15L16 7",stroke:"#FEC900","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]}),Mn.jsx("div",{dangerouslySetInnerHTML:{__html:e}})]},t)))})})})]})})};function rW(e){return Mn.jsx(Ct,{type:"primary",href:"https://yaycommerce.com/yaymail-woocommerce-email-customizer/",target:"_blank",...e,className:`yaymail-go-pro__buy-now-button ${e.className}`,children:e.children?e.children:__("Get YayMail Pro","yaymail")})}const aW=()=>Mn.jsx(Mn.Fragment,{children:Mn.jsx("h4",{className:XD,children:__("Smart move — you’re going to love what’s next.","yaymail")})}),sW=({isOpen:e,onClose:t})=>Mn.jsx(Mn.Fragment,{children:Mn.jsx(Gb,{title:Mn.jsx(tH,{content:Mn.jsx(aW,{})}),className:"yaymail-global__modal yaymail-go-pro__modal",open:e,onCancel:()=>{t()},centered:!0,footer:null,children:Mn.jsxs("div",{className:"modal__content",children:[Mn.jsx(oW,{isCrossPage:!0}),Mn.jsx(rW,{})]})})}),lW=window.React.useCallback,cW=window.React.useRef,uW=()=>Mn.jsx("h4",{className:XD,children:__("Save template?","yaymail")}),dW=()=>{const e=eM((e=>e.changeContentStatus)),t=X$((e=>e.reset)),n=eM((e=>e.isDiscardChangesConfirmModalDisplayed)),i=eM((e=>e.hideDiscardChangesConfirmModal)),o=lW((()=>{i()}),[]),{saveFunction:r}=hB(),a=cW((()=>{})),s=m_(),l=eM((e=>e.navigatingPath)),c=lW((async()=>{o(),await new Promise((t=>{e(!1),t()})),a.current(),l&&(t(),s(l))}),[o,l,e,t,s]),u=lW((()=>{o(),r(),a.current(),l&&(t(),s(l))}),[r,o,l,t,s]);return Mn.jsx(Gb,{title:Mn.jsx(tH,{content:Mn.jsx(uW,{})}),className:"yaymail-global__modal yaymail-blank-template__modal",open:n,onCancel:o,centered:!0,width:"500px",footer:Mn.jsx(eH,{onOk:u,onCancel:c,okText:__("Save","yaymail"),cancelText:__("No, don't save")}),destroyOnClose:!0,children:__("Do you want to save before moving to another template?","yaymail")})};function hW(){const e=`paint0_linear_${i$()}`;return Mn.jsxs("svg",{width:"37",height:"20",viewBox:"0 0 37 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Mn.jsx("rect",{x:"1.25",y:"0.5",width:"35",height:"19",rx:"4.5",fill:"#18191A"}),Mn.jsx("rect",{x:"1.25",y:"0.5",width:"35",height:"19",rx:"4.5",stroke:"#8F6C07"}),Mn.jsx("path",{d:"M8.86504 6.4541H11.6238C12.3139 6.4541 12.8738 6.6722 13.3035 7.1084C13.7332 7.54134 13.948 8.10612 13.948 8.80273C13.948 9.48958 13.7283 10.0495 13.2889 10.4824C12.8494 10.9121 12.283 11.127 11.5896 11.127H9.95879V13.5H8.86504V6.4541ZM9.95879 7.4209V10.165H11.3357C11.8077 10.165 12.174 10.0479 12.4344 9.81348C12.698 9.57585 12.8299 9.23893 12.8299 8.80273C12.8299 8.35677 12.7013 8.01497 12.4441 7.77734C12.187 7.53971 11.8175 7.4209 11.3357 7.4209H9.95879ZM16.7529 7.41602V9.88184H18.3252C18.7484 9.88184 19.0755 9.77441 19.3066 9.55957C19.541 9.34473 19.6582 9.04036 19.6582 8.64648C19.6582 8.26237 19.5361 7.96126 19.292 7.74316C19.0511 7.52507 18.7191 7.41602 18.2959 7.41602H16.7529ZM16.7529 10.8145V13.5H15.6592V6.4541H18.4473C19.1569 6.4541 19.7233 6.65104 20.1465 7.04492C20.5697 7.43555 20.7812 7.96126 20.7812 8.62207C20.7812 9.09733 20.6592 9.51562 20.415 9.87695C20.1742 10.235 19.8405 10.4873 19.4141 10.6338L20.9961 13.5H19.7314L18.2959 10.8145H16.7529ZM25.6418 6.2832C26.6574 6.2832 27.4582 6.61523 28.0441 7.2793C28.6301 7.9401 28.923 8.83854 28.923 9.97461C28.923 11.1107 28.6301 12.0107 28.0441 12.6748C27.4582 13.3389 26.6574 13.6709 25.6418 13.6709C24.6229 13.6709 23.8189 13.3405 23.2297 12.6797C22.6438 12.0156 22.3508 11.1139 22.3508 9.97461C22.3508 8.83854 22.6454 7.9401 23.2346 7.2793C23.827 6.61523 24.6294 6.2832 25.6418 6.2832ZM25.6418 7.30371C24.9777 7.30371 24.4488 7.5446 24.0549 8.02637C23.6643 8.50814 23.4689 9.15755 23.4689 9.97461C23.4689 10.7917 23.6626 11.4427 24.05 11.9277C24.4374 12.4095 24.968 12.6504 25.6418 12.6504C26.3091 12.6504 26.8365 12.4095 27.2238 11.9277C27.6112 11.4427 27.8049 10.7917 27.8049 9.97461C27.8049 9.1543 27.6112 8.50488 27.2238 8.02637C26.8365 7.5446 26.3091 7.30371 25.6418 7.30371Z",fill:`url(#${e})`}),Mn.jsx("defs",{children:Mn.jsxs("linearGradient",{id:e,x1:"7.75",y1:"10",x2:"29.75",y2:"10",gradientUnits:"userSpaceOnUse",children:[Mn.jsx("stop",{"stop-color":"#FFD965"}),Mn.jsx("stop",{offset:"0.25","stop-color":"#CDA534"}),Mn.jsx("stop",{offset:"0.75","stop-color":"#B38615"}),Mn.jsx("stop",{offset:"1","stop-color":"#FFD965"})]})})]})}Qk(!1);const pW=lE()(nE(eE(iE(((e,t)=>({activeTab:"patterns",isOpen:!1,currentSectionTemplate:{},openPanel:()=>e((e=>{e.isOpen=!0})),closePanel:()=>e((e=>{e.isOpen=!1})),setCurrentSectionTemplate:t=>e((e=>{e.currentSectionTemplate=t})),setActiveTab:t=>e((e=>{e.activeTab=t}))}))))),oE);var mW={},fW={},gW={exports:{}},yW={exports:{}};(function(){var e,t,n,i,o,r;"undefined"!=typeof performance&&null!==performance&&performance.now?yW.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(yW.exports=function(){return(e()-o)/1e6},t=process.hrtime,i=(e=function(){var e;return 1e9*(e=t())[0]+e[1]})(),r=1e9*process.uptime(),o=i-r):Date.now?(yW.exports=function(){return Date.now()-n},n=Date.now()):(yW.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}).call(ye);for(var vW=yW.exports,bW="undefined"==typeof window?ye:window,wW=["moz","webkit"],xW="AnimationFrame",CW=bW["request"+xW],_W=bW["cancel"+xW]||bW["cancelRequest"+xW],SW=0;!CW&&SW=0;i--){var o=jW[i]+n;if(o in t)return o}return!1}(t);return FW[t]=FW[e]=FW[n]=n,n}(t)),i){if(void 0===n)return e.style[i];e.style[i]=function(e,t){return"number"!=typeof t||PW[e]?t:t+"px"}(i,n)}}function BW(){2===arguments.length?"string"==typeof arguments[1]?arguments[0].style.cssText=arguments[1]:function(e,t){for(var n in t)t.hasOwnProperty(n)&&VW(e,n,t[n])}(arguments[0],arguments[1]):VW(arguments[0],arguments[1],arguments[2])}AW.exports=BW,AW.exports.set=BW,AW.exports.get=function(e,t){return Array.isArray(t)?t.reduce((function(t,n){return t[n]=VW(e,n||""),t}),{}):VW(e,t||"")};var WW=AW.exports,UW={exports:{}};function YW(){}function ZW(){}ZW.resetWarningCache=YW,UW.exports=function(){function e(e,t,n,i,o,r){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ZW,resetWarningCache:YW};return n.PropTypes=n,n}();var GW=UW.exports,qW={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return"string"==typeof e}}(qW);var KW={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){if((!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&!1!==i)return i;if("undefined"!=typeof document){var e=document.createElement("div");(0,n.default)(e,{width:100,height:100,position:"absolute",top:-9999,overflow:"scroll",MsOverflowStyle:"scrollbar"}),document.body.appendChild(e),i=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}else i=0;return i||0};var t,n=(t=WW)&&t.__esModule?t:{default:t},i=!1}(KW);var QW={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){return!1}}(QW);var XW={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){var t=e.clientWidth,n=getComputedStyle(e),i=n.paddingLeft,o=n.paddingRight;return t-parseFloat(i)-parseFloat(o)}}(XW);var JW={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){var t=e.clientHeight,n=getComputedStyle(e),i=n.paddingTop,o=n.paddingBottom;return t-parseFloat(i)-parseFloat(o)}}(JW);var eU={};Object.defineProperty(eU,"__esModule",{value:!0}),eU.containerStyleDefault={position:"relative",overflow:"hidden",width:"100%",height:"100%"},eU.containerStyleAutoHeight={height:"auto"},eU.viewStyleDefault={position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"scroll",WebkitOverflowScrolling:"touch"},eU.viewStyleAutoHeight={position:"relative",top:void 0,left:void 0,right:void 0,bottom:void 0},eU.viewStyleUniversalInitial={overflow:"hidden",marginRight:0,marginBottom:0},eU.trackHorizontalStyleDefault={position:"absolute",height:6},eU.trackVerticalStyleDefault={position:"absolute",width:6},eU.thumbHorizontalStyleDefault={position:"relative",display:"block",height:"100%"},eU.thumbVerticalStyleDefault={position:"relative",display:"block",width:"100%"},eU.disableSelectStyle={userSelect:"none"},eU.disableSelectStyleReset={userSelect:""};var tU={};Object.defineProperty(tU,"__esModule",{value:!0});var nU=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Object.assign||function(e){for(var t=1;t1?n-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:0;this.view&&(this.view.scrollLeft=e)}},{key:"scrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.view&&(this.view.scrollTop=e)}},{key:"scrollToLeft",value:function(){this.view&&(this.view.scrollLeft=0)}},{key:"scrollToTop",value:function(){this.view&&(this.view.scrollTop=0)}},{key:"scrollToRight",value:function(){this.view&&(this.view.scrollLeft=this.view.scrollWidth)}},{key:"scrollToBottom",value:function(){this.view&&(this.view.scrollTop=this.view.scrollHeight)}},{key:"addListeners",value:function(){if("undefined"!=typeof document&&this.view){var e=this.view,t=this.trackHorizontal,n=this.trackVertical,i=this.thumbHorizontal,o=this.thumbVertical;e.addEventListener("scroll",this.handleScroll),(0,c.default)()&&(t.addEventListener("mouseenter",this.handleTrackMouseEnter),t.addEventListener("mouseleave",this.handleTrackMouseLeave),t.addEventListener("mousedown",this.handleHorizontalTrackMouseDown),n.addEventListener("mouseenter",this.handleTrackMouseEnter),n.addEventListener("mouseleave",this.handleTrackMouseLeave),n.addEventListener("mousedown",this.handleVerticalTrackMouseDown),i.addEventListener("mousedown",this.handleHorizontalThumbMouseDown),o.addEventListener("mousedown",this.handleVerticalThumbMouseDown),window.addEventListener("resize",this.handleWindowResize))}}},{key:"removeListeners",value:function(){if("undefined"!=typeof document&&this.view){var e=this.view,t=this.trackHorizontal,n=this.trackVertical,i=this.thumbHorizontal,o=this.thumbVertical;e.removeEventListener("scroll",this.handleScroll),(0,c.default)()&&(t.removeEventListener("mouseenter",this.handleTrackMouseEnter),t.removeEventListener("mouseleave",this.handleTrackMouseLeave),t.removeEventListener("mousedown",this.handleHorizontalTrackMouseDown),n.removeEventListener("mouseenter",this.handleTrackMouseEnter),n.removeEventListener("mouseleave",this.handleTrackMouseLeave),n.removeEventListener("mousedown",this.handleVerticalTrackMouseDown),i.removeEventListener("mousedown",this.handleHorizontalThumbMouseDown),o.removeEventListener("mousedown",this.handleVerticalThumbMouseDown),window.removeEventListener("resize",this.handleWindowResize),this.teardownDragging())}}},{key:"handleScroll",value:function(e){var t=this,n=this.props,i=n.onScroll,o=n.onScrollFrame;i&&i(e),this.update((function(e){var n=e.scrollLeft,i=e.scrollTop;t.viewScrollLeft=n,t.viewScrollTop=i,o&&o(e)})),this.detectScrolling()}},{key:"handleScrollStart",value:function(){var e=this.props.onScrollStart;e&&e(),this.handleScrollStartAutoHide()}},{key:"handleScrollStartAutoHide",value:function(){this.props.autoHide&&this.showTracks()}},{key:"handleScrollStop",value:function(){var e=this.props.onScrollStop;e&&e(),this.handleScrollStopAutoHide()}},{key:"handleScrollStopAutoHide",value:function(){this.props.autoHide&&this.hideTracks()}},{key:"handleWindowResize",value:function(){(0,c.default)(!1),this.forceUpdate()}},{key:"handleHorizontalTrackMouseDown",value:function(e){e.preventDefault();var t=e.target,n=e.clientX,i=t.getBoundingClientRect().left,o=this.getThumbHorizontalWidth(),r=Math.abs(i-n)-o/2;this.view.scrollLeft=this.getScrollLeftForOffset(r)}},{key:"handleVerticalTrackMouseDown",value:function(e){e.preventDefault();var t=e.target,n=e.clientY,i=t.getBoundingClientRect().top,o=this.getThumbVerticalHeight(),r=Math.abs(i-n)-o/2;this.view.scrollTop=this.getScrollTopForOffset(r)}},{key:"handleHorizontalThumbMouseDown",value:function(e){e.preventDefault(),this.handleDragStart(e);var t=e.target,n=e.clientX,i=t.offsetWidth,o=t.getBoundingClientRect().left;this.prevPageX=i-(n-o)}},{key:"handleVerticalThumbMouseDown",value:function(e){e.preventDefault(),this.handleDragStart(e);var t=e.target,n=e.clientY,i=t.offsetHeight,o=t.getBoundingClientRect().top;this.prevPageY=i-(n-o)}},{key:"setupDragging",value:function(){(0,r.default)(document.body,p.disableSelectStyle),document.addEventListener("mousemove",this.handleDrag),document.addEventListener("mouseup",this.handleDragEnd),document.onselectstart=u.default}},{key:"teardownDragging",value:function(){(0,r.default)(document.body,p.disableSelectStyleReset),document.removeEventListener("mousemove",this.handleDrag),document.removeEventListener("mouseup",this.handleDragEnd),document.onselectstart=void 0}},{key:"handleDragStart",value:function(e){this.dragging=!0,e.stopImmediatePropagation(),this.setupDragging()}},{key:"handleDrag",value:function(e){if(this.prevPageX){var t=e.clientX,n=-this.trackHorizontal.getBoundingClientRect().left+t-(this.getThumbHorizontalWidth()-this.prevPageX);this.view.scrollLeft=this.getScrollLeftForOffset(n)}if(this.prevPageY){var i=e.clientY,o=-this.trackVertical.getBoundingClientRect().top+i-(this.getThumbVerticalHeight()-this.prevPageY);this.view.scrollTop=this.getScrollTopForOffset(o)}return!1}},{key:"handleDragEnd",value:function(){this.dragging=!1,this.prevPageX=this.prevPageY=0,this.teardownDragging(),this.handleDragEndAutoHide()}},{key:"handleDragEndAutoHide",value:function(){this.props.autoHide&&this.hideTracks()}},{key:"handleTrackMouseEnter",value:function(){this.trackMouseOver=!0,this.handleTrackMouseEnterAutoHide()}},{key:"handleTrackMouseEnterAutoHide",value:function(){this.props.autoHide&&this.showTracks()}},{key:"handleTrackMouseLeave",value:function(){this.trackMouseOver=!1,this.handleTrackMouseLeaveAutoHide()}},{key:"handleTrackMouseLeaveAutoHide",value:function(){this.props.autoHide&&this.hideTracks()}},{key:"showTracks",value:function(){clearTimeout(this.hideTracksTimeout),(0,r.default)(this.trackHorizontal,{opacity:1}),(0,r.default)(this.trackVertical,{opacity:1})}},{key:"hideTracks",value:function(){var e=this;if(!this.dragging&&!this.scrolling&&!this.trackMouseOver){var t=this.props.autoHideTimeout;clearTimeout(this.hideTracksTimeout),this.hideTracksTimeout=setTimeout((function(){(0,r.default)(e.trackHorizontal,{opacity:0}),(0,r.default)(e.trackVertical,{opacity:0})}),t)}}},{key:"detectScrolling",value:function(){var e=this;this.scrolling||(this.scrolling=!0,this.handleScrollStart(),this.detectScrollingInterval=setInterval((function(){e.lastViewScrollLeft===e.viewScrollLeft&&e.lastViewScrollTop===e.viewScrollTop&&(clearInterval(e.detectScrollingInterval),e.scrolling=!1,e.handleScrollStop()),e.lastViewScrollLeft=e.viewScrollLeft,e.lastViewScrollTop=e.viewScrollTop}),100))}},{key:"raf",value:function(e){var t=this;this.requestFrame&&o.default.cancel(this.requestFrame),this.requestFrame=(0,o.default)((function(){t.requestFrame=void 0,e()}))}},{key:"update",value:function(e){var t=this;this.raf((function(){return t._update(e)}))}},{key:"_update",value:function(e){var t=this.props,n=t.onUpdate,i=t.hideTracksWhenNotNeeded,o=this.getValues();if((0,c.default)()){var a=o.scrollLeft,s=o.clientWidth,l=o.scrollWidth,u=(0,d.default)(this.trackHorizontal),p=this.getThumbHorizontalWidth(),m={width:p,transform:"translateX("+a/(l-s)*(u-p)+"px)"},f=o.scrollTop,g=o.clientHeight,y=o.scrollHeight,v=(0,h.default)(this.trackVertical),b=this.getThumbVerticalHeight(),w={height:b,transform:"translateY("+f/(y-g)*(v-b)+"px)"};if(i){var x={visibility:l>s?"visible":"hidden"},C={visibility:y>g?"visible":"hidden"};(0,r.default)(this.trackHorizontal,x),(0,r.default)(this.trackVertical,C)}(0,r.default)(this.thumbHorizontal,m),(0,r.default)(this.thumbVertical,w)}n&&n(o),"function"==typeof e&&e(o)}},{key:"render",value:function(){var e=this,n=(0,c.default)(),i=this.props;i.onScroll,i.onScrollFrame,i.onScrollStart,i.onScrollStop,i.onUpdate;var o=i.renderView,r=i.renderTrackHorizontal,s=i.renderTrackVertical,u=i.renderThumbHorizontal,d=i.renderThumbVertical,h=i.tagName;i.hideTracksWhenNotNeeded;var m=i.autoHide;i.autoHideTimeout;var f=i.autoHideDuration;i.thumbSize,i.thumbMinSize;var g=i.universal,y=i.autoHeight,v=i.autoHeightMin,b=i.autoHeightMax,w=i.style,x=i.children,C=function(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}(i,["onScroll","onScrollFrame","onScrollStart","onScrollStop","onUpdate","renderView","renderTrackHorizontal","renderTrackVertical","renderThumbHorizontal","renderThumbVertical","tagName","hideTracksWhenNotNeeded","autoHide","autoHideTimeout","autoHideDuration","thumbSize","thumbMinSize","universal","autoHeight","autoHeightMin","autoHeightMax","style","children"]),_=this.state.didMountUniversal,S=t({},p.containerStyleDefault,y&&t({},p.containerStyleAutoHeight,{minHeight:v,maxHeight:b}),w),k=t({},p.viewStyleDefault,{marginRight:n?-n:0,marginBottom:n?-n:0},y&&t({},p.viewStyleAutoHeight,{minHeight:(0,l.default)(v)?"calc("+v+" + "+n+"px)":v+n,maxHeight:(0,l.default)(b)?"calc("+b+" + "+n+"px)":b+n}),y&&g&&!_&&{minHeight:v,maxHeight:b},g&&!_&&p.viewStyleUniversalInitial),E={transition:"opacity "+f+"ms",opacity:0},$=t({},p.trackHorizontalStyleDefault,m&&E,(!n||g&&!_)&&{display:"none"}),M=t({},p.trackVerticalStyleDefault,m&&E,(!n||g&&!_)&&{display:"none"});return(0,a.createElement)(h,t({},C,{style:S,ref:function(t){e.container=t}}),[(0,a.cloneElement)(o({style:k}),{key:"view",ref:function(t){e.view=t}},x),(0,a.cloneElement)(r({style:$}),{key:"trackHorizontal",ref:function(t){e.trackHorizontal=t}},(0,a.cloneElement)(u({style:p.thumbHorizontalStyleDefault}),{ref:function(t){e.thumbHorizontal=t}})),(0,a.cloneElement)(s({style:M}),{key:"trackVertical",ref:function(t){e.trackVertical=t}},(0,a.cloneElement)(d({style:p.thumbVerticalStyleDefault}),{ref:function(t){e.thumbVertical=t}}))])}}]),s}(a.Component);e.default=g,g.propTypes={onScroll:s.default.func,onScrollFrame:s.default.func,onScrollStart:s.default.func,onScrollStop:s.default.func,onUpdate:s.default.func,renderView:s.default.func,renderTrackHorizontal:s.default.func,renderTrackVertical:s.default.func,renderThumbHorizontal:s.default.func,renderThumbVertical:s.default.func,tagName:s.default.string,thumbSize:s.default.number,thumbMinSize:s.default.number,hideTracksWhenNotNeeded:s.default.bool,autoHide:s.default.bool,autoHideTimeout:s.default.number,autoHideDuration:s.default.number,autoHeight:s.default.bool,autoHeightMin:s.default.oneOfType([s.default.number,s.default.string]),autoHeightMax:s.default.oneOfType([s.default.number,s.default.string]),universal:s.default.bool,style:s.default.object,children:s.default.node},g.defaultProps={renderView:m.renderViewDefault,renderTrackHorizontal:m.renderTrackHorizontalDefault,renderTrackVertical:m.renderTrackVerticalDefault,renderThumbHorizontal:m.renderThumbHorizontalDefault,renderThumbVertical:m.renderThumbVerticalDefault,tagName:"div",thumbMinSize:30,hideTracksWhenNotNeeded:!1,autoHide:!1,autoHideTimeout:1e3,autoHideDuration:200,autoHeight:!1,autoHeightMin:0,autoHeightMax:200,universal:!1}}(fW),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scrollbars=void 0;var t=function(e){return e&&e.__esModule?e:{default:e}}(fW);e.default=t.default,e.Scrollbars=t.default}(mW);const aU=window.React.forwardRef,sU=window.React.useState,lU=({style:e,...t})=>Mn.jsx("div",{...t,style:{...e,cursor:"pointer",borderRadius:"inherit",width:"3px"}}),cU=aU((({children:e},t)=>{const[n,i]=sU(!1);return Mn.jsx(mW.Scrollbars,{ref:t,renderThumbVertical:lU,className:_$("yaymail-custom-scrollbar",n&&"yaymail-scrolling"),onScrollStart:()=>i(!0),onScrollStop:()=>i(!1),...window.yaymailData.is_rtl?{renderView:e=>Mn.jsx("div",{...e,style:{...e.style,marginLeft:e.style.marginRight,marginRight:0,overflowX:"hidden"}})}:{},children:Mn.jsx("div",{className:"yaymail-customizer-scroll-content",children:e})})})),uU=window.React.useMemo,dU=({element:e,onClick:t,className:n})=>{const{name:i,style:o,icon:r,available:a,status_info:s,disabled_reason:l}=e,c=uU((()=>((null==i?void 0:i.length)??0)>=43),[i]),u=uU((()=>!c&&a?"":Mn.jsxs("div",{style:{textAlign:"center"},children:[c&&Mn.jsx("div",{children:i}),!a&&Mn.jsx("div",{style:{display:"flex",justifyContent:"center",flexDirection:"column",gap:8},dangerouslySetInnerHTML:{__html:(null==l?void 0:l.html)??__("Not available in this template","yaymail")}})]})),[a,c,i,l]);return Mn.jsx(uH,{element:e,style:o,selectable:!1,isSidebar:!0,onClick:t,className:n,children:Mn.jsxs(he,{placement:"bottom",title:u,overlayInnerStyle:{maxWidth:"300px",fontSize:"11px"},children:[Mn.jsxs("div",{className:`yaymail-customizer-sidebar-element ${a?"":a$}`,children:[Mn.jsx("div",{className:"yaymail-element__icon yaymail-pointer-events-none",dangerouslySetInnerHTML:{__html:r}}),Mn.jsx("div",{className:"yaymail-customizer-sidebar-element__name yaymail-pointer-events-none",children:i}),Mn.jsx("div",{className:"yaymail-customizer-sidebar-element__status-info",children:void 0!==s&&Mn.jsx(Ka,{count:s.text??__("New","yaymail"),color:s.color??"#CD9F35"})})]}),Mn.jsx("div",{className:"yaymail-ghost-element",children:Mn.jsx("div",{className:"yaymail-element__icon yaymail-pointer-events-none",dangerouslySetInnerHTML:{__html:r}})})]})})},hU=window.React.useMemo,pU=e=>{const{elements:t,isDragdropEnabled:n=!0,itemClass:i,className:o}=e,r=hU((()=>e.children?e.children:t?t.map((e=>Mn.jsx(dU,{className:i,element:e,onClick:e.onClick},e.id))):""),[t]);return n?Mn.jsx(YT,{list:t,className:_$(r$,o),setList:()=>!1,clone:!0,sort:!1,children:r}):Mn.jsx("div",{className:r$,children:r})},mU=window.React.useEffect,fU=window.React.useRef;function gU(e){const t=cE((e=>e.settings)),{patterns:n}=e;return mU((()=>{let e=0;function n(){window.jQuery(".yaymail-pattern-item").each(((e,n)=>{const i=window.jQuery(n).find(".yaymail-pattern-item__preview");i.css("height","");const o=i.height()??0;let r=276/((null==t?void 0:t.container_width)??900);i.css("height",o*r+"px")}))}n();let i=setInterval((()=>{n(),e++,e>10&&clearInterval(i)}),100);return()=>{clearInterval(i)}}),[n]),Mn.jsx(pU,{elements:n.map((e=>e.elements)),className:"yaymail-pattern-list",children:n.map((e=>(e.elements=((e,t)=>{const n=structuredClone(t),i=[];return n.forEach(((t,o)=>{e.includes(t.id)&&i.push(x$(t)),null!=t.children&&(n[o].children=d$(e,t.children))})),i})(e.elements.map((e=>e.id)),e.elements),Mn.jsx(yU,{pattern:e,containerWidth:(null==t?void 0:t.container_width)??900},e.id))))})}function yU(e){const{pattern:t,containerWidth:n}=e,i=fU(null);return mU((()=>{if(null==i.current)return;const e=window.jQuery(i.current).find(".yaymail-pattern-item").get(0);if(!e)return;const t=window.jQuery(i.current).find(".yaymail-pattern-item__preview"),n=t.height()??0,o=window.getComputedStyle(e);let r=parseFloat(o.getPropertyValue("--yaymail-pattern-preview-iframe-scale").trim());t.css("height",n*r+"px")}),[i.current,t.id]),Mn.jsxs("div",{className:"yaymail-pattern-item-wrapper yaymail-customizer-main","data-yaymail-element-is-pattern":!0,"data-yaymail-element-type":t.type??"","data-yaymail-element-id":t.id,children:[Mn.jsxs("div",{className:"yaymail-customizer-sidebar-element yaymail-pattern-item",style:{"--yaymail-pattern-preview-iframe-width":n+"px","--yaymail-pattern-preview-iframe-scale":""+276/n},children:[Mn.jsx("div",{className:"yaymail-pattern-item__preview",children:Mn.jsx("div",{className:"yaymail-pattern-item__preview__container",children:Mn.jsx("div",{className:"yaymail-pattern-item__preview__scale-container",children:Mn.jsx("div",{className:"yaymail-customizer-email-template-container",children:Mn.jsx(vV,{list:t.elements})})})})}),Mn.jsxs("span",{className:"yaymail-pattern-item__name",children:[" ",t.name]})]}),Mn.jsx("div",{className:"yaymail-ghost-element yaymail-ghost-pattern-element",style:{width:n+"px"},children:Mn.jsx("div",{className:"yaymail-pattern-ghost-list",children:Mn.jsx(vV,{list:t.elements})})})]})}const vU=window.React.useMemo,bU=window.React.useState,wU=()=>{const e=pW((e=>e.currentSectionTemplate)),[t,n]=bU(""),i=vU((()=>Boolean(t)),[t]),o=vU((()=>{var n;const i=null==(n=null==e?void 0:e.patterns)?void 0:n.sort(((e,t)=>e.position-t.position));return t?null==i?void 0:i.filter((e=>{var n;return null==(n=e.name)?void 0:n.toLowerCase().includes(t.toLowerCase())})):i}),[null==e?void 0:e.patterns,t]);return Mn.jsxs("div",{className:"yaymail-patterns-panel__tab-content",style:{height:"100%"},children:[Mn.jsx(bb,{className:"yaymail-custom-search",placeholder:__("Search patterns","yaymail"),onChange:e=>{n(e.target.value)},size:"small",value:t,suffix:i?Mn.jsx(BL,{className:"yaymail-close-circle-filled-icon",onClick:()=>{n("")}}):Mn.jsx(sD,{})}),Mn.jsxs(cU,{children:[0===(null==o?void 0:o.length)&&Mn.jsx(kn,{className:"empty-pattern-search-result",image:kn.PRESENTED_IMAGE_SIMPLE,description:Mn.jsx("span",{className:"empty-pattern-search-result__message",children:__("No pattern found.","yaymail")})}),Mn.jsx(gU,{patterns:o??[]})]})]})},xU=window.React.useState;function CU(){const[e,t]=xU(!1),n=()=>{t(!0)};return Mn.jsxs(Mn.Fragment,{children:[Mn.jsxs("div",{className:"yaymail-upgrade-notice",children:[Mn.jsx("span",{className:"yaymail-upgrade-notice__text",children:__("This feature available in PRO version.","yaymail")}),Mn.jsx(Ct,{type:"primary",className:"yaymail-upgrade-notice__button",onClick:n,children:__("Upgrade Now","yaymail")})]}),Mn.jsx(sW,{isOpen:e,onOpen:n,onClose:()=>{t(!1)}})]})}const _U=()=>Mn.jsx("div",{className:"yaymail-patterns-panel__tab-content",style:{height:"100%"},children:Mn.jsxs("div",{className:"yaymail-library-tab-content__container",style:{minHeight:200,position:"relative"},children:[Mn.jsx("div",{className:"yaymail-pattern-list",style:{opacity:.1,pointerEvents:"none",userSelect:"none"},children:Array(3).fill(0).map(((e,t)=>Mn.jsx("div",{className:"yaymail-pattern-item-wrapper",children:Mn.jsxs("div",{className:"yaymail-customizer-sidebar-element yaymail-pattern-item",style:{marginBottom:10},children:[Mn.jsx("div",{style:{width:"100%",background:"#b8b8b8",height:70,borderRadius:7}}),Mn.jsxs("div",{children:[__("Pattern","yaymail")," ",t+1]})]})},t)))}),Mn.jsx(CU,{})]})}),SU=()=>{const e=[{key:"patterns",label:Mn.jsx("span",{className:"yaymail-tab-name",children:__("Patterns","yaymail")}),children:Mn.jsx(wU,{})},{key:"library",label:Mn.jsxs("span",{className:"yaymail-tab-name",children:[__("Library","yaymail"),Mn.jsx(hW,{})]}),children:Mn.jsx(_U,{}),className:"yaymail-library-tab-content"}],t=pW((e=>e.isOpen)),n=pW((e=>e.closePanel)),i=pW((e=>e.activeTab)),o=pW((e=>e.setActiveTab));return KD((()=>{var e;null==n||n(),null==(e=document.querySelector(".yaymail-pattern-collapses .is-selected"))||e.classList.remove("yaymail-collapse-item-active","is-selected")}),t,{ignoredElementsCssSelectors:[".yaymail-customizer-sidebar__patterns-panel",".yaymail-section-template",".yaymail-global__modal",".yaymail-context-menu-item",".yaymail-pattern-collapses",".yaymail-close-circle-filled-icon",".yaymail-save-to-library-notification__view-library"]},[".yaymail-tabs-nav-wrap",".yaymail-customizer-email-template-container .yaymail-customizer-element"].join(",")),Mn.jsx("div",{style:{position:"relative"},children:Mn.jsx("div",{className:_$("yaymail-customizer-sidebar__patterns-panel",t?"yaymail-pattern-panel-open":""),children:Mn.jsxs("div",{style:{margin:ix.sidebar.padding},children:[Mn.jsx("h2",{className:"yaymail-patterns-panel__title",children:__("DRAG TO USE","yaymail")}),Mn.jsx("div",{className:"yaymail-patterns-panel__tabs",children:Mn.jsx(bh,{activeKey:i,onChange:e=>o(e),centered:!0,defaultActiveKey:e[0].key,items:e,className:"yaymail-patterns-panel__tabs_tabs",destroyInactiveTabPane:!0})}),Mn.jsx("div",{})]})})})},kU=e=>lO.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("path",{d:"M8.80244 4.75002V7.69329L11.3187 9.16053C11.4455 9.23451 11.5368 9.3544 11.5726 9.49383C11.6084 9.63325 11.5857 9.78078 11.5096 9.90397C11.4335 10.0272 11.3101 10.1159 11.1667 10.1507C11.0232 10.1855 10.8714 10.1635 10.7447 10.0895L7.9581 8.46449C7.87563 8.41633 7.80739 8.34824 7.76002 8.26685C7.71265 8.18545 7.68777 8.09352 7.6878 8.00001V4.75002C7.6878 4.60636 7.74652 4.46858 7.85104 4.367C7.95555 4.26542 8.09731 4.20835 8.24512 4.20835C8.39293 4.20835 8.53469 4.26542 8.6392 4.367C8.74372 4.46858 8.80244 4.60636 8.80244 4.75002ZM8.24512 1.50002C7.36595 1.49789 6.49507 1.66525 5.68289 1.99241C4.87071 2.31957 4.13336 2.80004 3.5135 3.40601C3.00704 3.90434 2.557 4.38371 2.11463 4.88543V3.66668C2.11463 3.52303 2.05592 3.38525 1.9514 3.28367C1.84688 3.18209 1.70513 3.12502 1.55732 3.12502C1.40951 3.12502 1.26775 3.18209 1.16323 3.28367C1.05872 3.38525 1 3.52303 1 3.66668V6.37501C1 6.51867 1.05872 6.65645 1.16323 6.75803C1.26775 6.85961 1.40951 6.91668 1.55732 6.91668H4.3439C4.49171 6.91668 4.63347 6.85961 4.73798 6.75803C4.8425 6.65645 4.90122 6.51867 4.90122 6.37501C4.90122 6.23135 4.8425 6.09358 4.73798 5.992C4.63347 5.89042 4.49171 5.83335 4.3439 5.83335H2.74162C3.23972 5.26324 3.73573 4.72632 4.30141 4.16976C5.07597 3.41694 6.06163 2.90267 7.1352 2.6912C8.20878 2.47972 9.32267 2.58043 10.3377 2.98072C11.3527 3.38102 12.2239 4.06316 12.8423 4.94191C13.4607 5.82065 13.799 6.85704 13.8148 7.92157C13.8307 8.9861 13.5234 10.0316 12.9314 10.9273C12.3394 11.8231 11.4889 12.5294 10.4862 12.9581C9.48351 13.3868 8.37308 13.5188 7.29366 13.3375C6.21424 13.1563 5.2137 12.67 4.41705 11.9393C4.36381 11.8904 4.30117 11.8521 4.23273 11.8268C4.16428 11.8014 4.09136 11.7894 4.01813 11.7914C3.9449 11.7934 3.8728 11.8094 3.80594 11.8385C3.73907 11.8676 3.67876 11.9092 3.62845 11.9609C3.57813 12.0127 3.53879 12.0736 3.51268 12.1401C3.48657 12.2066 3.4742 12.2775 3.47627 12.3487C3.47834 12.4198 3.49481 12.4899 3.52475 12.5549C3.55468 12.6199 3.59749 12.6785 3.65074 12.7274C4.44453 13.4554 5.4096 13.9836 6.46171 14.2658C7.51382 14.548 8.621 14.5756 9.68663 14.3463C10.7523 14.1169 11.7439 13.6376 12.5751 12.9501C13.4063 12.2626 14.0518 11.3879 14.4551 10.4022C14.8585 9.41648 15.0075 8.34983 14.8891 7.29529C14.7708 6.24076 14.3887 5.2304 13.7762 4.35239C13.1638 3.47438 12.3395 2.7554 11.3754 2.25821C10.4112 1.76101 9.33656 1.50071 8.24512 1.50002Z",fill:"currentColor"})),EU=[{Component:LP},{Component:xP,props:{title:__("Optional settings","yaymail")}},{Component:SP,props:{title:__("CSS classes","yaymail"),attribute:"custom_css_classes",value_path:"custom_css_classes",initialValue:"",placeholder:__("Eg: classname-a classname-b","yaymail")}}],$U=window.React.useMemo,MU=()=>{const e=tF((e=>e.addonCustomPropertyEditors)),t=eM((e=>{var t;return null==(t=e.chosenElement)?void 0:t.type})),n=eM((e=>e.chosenElement)),i=$U((()=>null==n?void 0:n.data),[n]),o=eM((e=>e.updateChosenElementData)),r=eM((e=>{var t,n;return null==(n=null==(t=e.chosenElement)?void 0:t.children)?void 0:n.length}))??0;if(!t)return null;const a=hM((e=>e.elements)),s=$U((()=>{var e;if(!a||0===a.length)return;let t=null==(e=a.find((e=>{var t,i,o;return e.type===(null==n?void 0:n.type)&&"column_layout"!==(null==n?void 0:n.type)||"column_layout"===(null==n?void 0:n.type)&&(null==(t=null==n?void 0:n.data)?void 0:t.amount_of_columns)==(null==(o=null==(i=e.data)?void 0:i.amount_of_columns)?void 0:o.default_value)})))?void 0:e.data;if(!t)return;let o=structuredClone(t);return Object.keys(o).forEach((e=>{Object.prototype.hasOwnProperty.call(o[e],"default_value")?o[e].default_value=i[e]:o[e]={...o[e],...i[e]}})),o}),[a,null==n?void 0:n.type,i]),l=$U((()=>{let t=[];return void 0!==s&&(t=(t=>{let n=[];return Object.values(t).map((r=>{var a;const s=r.conditions??{},l=s.operator??"or";s.operator&&delete s.operator;const c="or"===l?"some":"every",u=Object.values(s)[c]((e=>{if(!t[e.attribute])return!0;const n=t[e.attribute].value_path??"",o=YE(i,n)??"";return"!="===e.comparison?o!==e.value:o&&"contain"===e.comparison&&Array.isArray(e.value)?e.value.every((e=>o.includes(e))):o&&"exclude"===e.comparison&&Array.isArray(e.value)?e.value.every((e=>!o.includes(e))):o===e.value}));if(!(Object.values(s).length>0)||u)switch(r.component){case"LineBreaker":n.push({Component:LP,props:{...r}});break;case"GroupDefinition":n.push({Component:xP,props:{...r}});break;case"Align":n.push({Component:yH,props:{...r}});break;case"Spacing":n.push({Component:qP,props:{...r}});break;case"BorderRadius":n.push({Component:Iz,props:{...r}});break;case"Media":n.push({Component:Wz,props:{...r}});break;case"Dimension":n.push({Component:wP,props:{...r}});break;case"Color":n.push({Component:UH,props:{...r}});break;case"TextInput":n.push({Component:SP,props:{...r}});break;case"Selector":n.push({Component:ZH,props:{...r}});break;case"EntitiesSelector":n.push({Component:Vz,props:{...r}});break;case"FontFamilySelector":n.push({Component:ZH,props:{...r,children:nz}});break;case"FontSizeSelector":n.push({Component:ZH,props:{options:rz,...r}});break;case"ButtonTypeSelector":n.push({Component:ZH,props:{options:iz,onChange:e=>{if(!i)return;const t=iz.find((t=>t.value===e)),n=(null==t?void 0:t.color)||"";o((e=>{e.button_type=t,e.button_background_color=n}),{attribute:r.title})},...r}});break;case"FontWeightSelector":n.push({Component:ZH,props:{options:oz,...r}});break;case"SocialIconThemeSelector":n.push({Component:ZH,props:{options:sz,...r}});break;case"DividerTypeSelector":n.push({Component:ZH,props:{options:az,...r}});break;case"RichTextEditor":n.push({Component:BP,props:{...r}});break;case"SocialList":n.push({Component:vz,props:{...r}});break;case"NumberColumn":n.push({Component:UP,props:{...r}});break;case"ImageList":n.push({Component:pz});break;case"ImageBox":n.push({Component:dz});break;case"TextList":n.push({Component:$z});break;case"BackgroundImage":n.push({Component:TH,props:{url_input_place_holder:"Eg: https://example.com/image.png",show_delete_button:!0,hide_preview_on_empty_url:!0,...r}});break;case"ColumnWidth":n.push({Component:sP,props:{title:r.title,amount:r.default_value}});break;case"HookSelector":n.push({Component:TP,props:{...r}});break;case"NumberInput":n.push({Component:zP,props:{...r,style:{width:"65px"}}});break;case"CheckboxGroup":n.push({Component:iP,props:{...r}});break;case"Switcher":n.push({Component:XP,props:{...r}});break;case"DatePicker":n.push({Component:yP,props:{...r}});break;case"Border":n.push({Component:eP,props:{...r,default_value:r.default_value??{side:"none",width:1,style:"solid",color:"#e5e5e5",custom:{left:1,top:1,right:1,bottom:1}}}});break;default:{const t=(null==(a=e.find((e=>e.name===r.component)))?void 0:a.component)??null;if(!qE(t))break;n.push({Component:t,props:{...r}});break}}})),n})(s)),t=t.concat(EU),t}),[t,o,r,i]);return 0===l.length?null:Mn.jsx(Mn.Fragment,{children:l.map((({Component:e,props:t},i)=>e?Mn.jsx(e,{...t},(null==n?void 0:n.id)+((null==t?void 0:t.value_path)??i)):null))})},RU=window.React.useCallback,AU=window.React.useEffect,OU=window.React.useRef,jU=()=>{const e=eM((e=>e.unchooseElement)),t=RU((()=>{e()}),[e]),n=eM((e=>{var t;return null==(t=e.chosenElement)?void 0:t.name})),i=eM((e=>{var t;return null==(t=e.chosenElement)?void 0:t.id})),o=OU(null);return AU((()=>{var e;null==(e=o.current)||e.scrollTop(0)}),[i]),Mn.jsxs(Mn.Fragment,{children:[Mn.jsx("div",{className:"yaymail-customizer-sidebar-editor__header",children:Mn.jsxs("span",{className:"yaymail-btn-back",onClick:t,children:[Mn.jsx(bL,{className:"yaymail-btn-back__icon"}),Mn.jsxs("span",{className:"yaymail-btn-back__label",children:["Edit ",n]})]})}),Mn.jsx(cU,{ref:o,children:Mn.jsx("main",{className:"yaymail-customizer-sidebar-editor__main",children:Mn.jsx(MU,{})})})]})},TU=window.React.useEffect,NU=window.React.useRef;function LU(){const e=eM((e=>e.setSpecialEditorScreen)),t=eM((e=>e.specialEditorScreen)),n=eM((e=>{var t;return null==(t=e.chosenElement)?void 0:t.id})),i=NU(null);return TU((()=>{var e;null==(e=i.current)||e.scrollTop(0)}),[t]),TU((()=>{n&&e(null)}),[n,e]),KD((()=>{e(null)}),!0,{boundaryElementSelectors:[".yaymail-customizer-template-section","[class^=yaymail-email-customizer__header]",".yaymail-customizer-main"]}),Mn.jsxs(Mn.Fragment,{children:[Mn.jsx("div",{className:"yaymail-customizer-sidebar-editor__header",children:Mn.jsxs("span",{className:"yaymail-btn-back",onClick:()=>{e(null)},children:[Mn.jsx(bL,{className:"yaymail-btn-back__icon"}),Mn.jsxs("span",{className:"yaymail-btn-back__label",children:["Edit ",null==t?void 0:t.title]})]})}),Mn.jsx(cU,{ref:i,children:Mn.jsxs("main",{className:"yaymail-customizer-sidebar-editor__main",children:["global_header"===(null==t?void 0:t.key)?Mn.jsx(uM,{}):null,"global_footer"===(null==t?void 0:t.key)?Mn.jsx(sM,{}):null]})})]})}const IU=window.React.useCallback,DU=()=>{const e=X$((e=>e.changes)),t=X$((e=>e.timeTravelingIndex)),n=X$((e=>e.jumpToChange)),i=IU((e=>e===t),[t]),o=IU((e=>e?"initialized"===e.action?Mn.jsx("span",{className:"yaymail-item-name-element",children:"Customizing started"}):e.customMessage?Mn.jsx("span",{className:"yaymail-item-name-element",children:e.customMessage}):Mn.jsxs("div",{style:{margin:"0 20px 0 0"},children:[(null==e?void 0:e.elementName)&&Mn.jsx("span",{className:"yaymail-item-name-element",children:e.elementName}),(null==e?void 0:e.attribute)&&Mn.jsxs("span",{className:"yaymail-item-attribute",children:[" - ",e.attribute]}),(null==e?void 0:e.action)&&Mn.jsxs("span",{className:"yaymail-item-type",children:[" ","- ",Mn.jsx("span",{className:"yaymail-item-type-content",children:e.action})]})]}):null),[]);return Mn.jsx("section",{className:"yaymail-list-actions",children:e.map((({info:e},t)=>Mn.jsxs("div",{className:"yaymail-list-actions__item "+(i(t)?"yaymail-list-actions__item__active":""),onClick:()=>n(t),children:[o(e),i(t)?Mn.jsx(PL,{}):""]},t)))})},HU=e=>lO.createElement("svg",{width:12,height:7,viewBox:"0 0 12 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("path",{d:"M6.4822 6.75771L11.762 1.38505C12.0793 1.0621 12.0793 0.571381 11.762 0.242216C11.4446 -0.0807387 10.9624 -0.0807387 10.6388 0.242216L5.99996 4.96268L1.3611 0.242216C1.04373 -0.0807392 0.561502 -0.0807392 0.238028 0.242215C0.0793419 0.403693 -2.47044e-08 0.56517 -3.55666e-08 0.813669C-4.2625e-08 0.975146 0.0793428 1.22364 0.158686 1.46579L5.35912 6.75771C5.5178 6.91919 5.67649 7 5.92069 7C6.15872 7 6.32351 6.91926 6.4822 6.75771Z",fill:"white",fillOpacity:.15})),PU=window.React.useMemo,zU=({items:e=[],className:t,panelStyle:n,...i})=>{const{token:o}=xw(),r=PU((()=>({background:ix.collapse.tab.background,border:"none",borderRadius:o.borderRadiusLG,fontSize:14,marginBottom:10,...n})),[o.borderRadiusLG]),a=PU((()=>e.map((e=>({...e,style:r,className:"yaymail-collapse-"+(null==e?void 0:e.key)+"-item"})))),[e,r]);return Mn.jsx(En,{className:_$("yaymail-customizer-sidebar-collapse",t),bordered:!1,expandIconPosition:"end",expandIcon:HU,items:a,style:{background:ix.sidebar.background},...i})},FU=window.React.useContext,VU=window.React.useMemo,BU=window.React.useState,WU=e=>{const{allSearchableElements:t,groups:n,tabFor:i,isDragdropEnabled:o,itemClass:r,onSearch:a,renderElementList:s,emptyText:l=__("No element found.","yaymail"),searchBoxPlaceholder:c=__("Search elements","yaymail")}=e,[u,d]=BU(""),h=pW((e=>e.activeTab)),p=pW((e=>e.setActiveTab)),[m,f]=BU(window.yaymailData.viewed_new_elements??[]),g=VU((()=>Boolean(u)),[u]),y=VU((()=>{if(a)return t.filter((e=>a(e,u)));const e=u.toLowerCase();return t.filter((t=>{var n;return"hidden"!==t.group&&((null==(n=t.name)?void 0:n.toLowerCase().includes(e))||t.type.toLowerCase().includes(e))}))}),[u,t,a]),{elementCollapseActiveKeys:v,setElementCollapseActiveKeys:b}=FU(PQ)??{},w=pW((e=>e.openPanel)),x=pW((e=>e.setCurrentSectionTemplate)),C=VU((()=>{const e=t.sort(((e,t)=>(e.position??0)-(t.position??0)));return(null==n?void 0:n.map((({key:t,label:n})=>{const i=e.filter((e=>wE(e.group)===t)),a=i.filter((e=>{var t;return(null==(t=e.status_info)?void 0:t.text.includes(__("New","yaymail")))&&!(null==m?void 0:m.includes(e.type))})).length;return{key:t,label:a>0&&"block"!==t?Mn.jsxs("span",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:5},children:[Mn.jsx("span",{children:n}),Mn.jsx(Ka,{dot:!0,color:"#CD9F35"})]}):n,children:s?s(i):Mn.jsx(pU,{isDragdropEnabled:o,elements:i,itemClass:r})}})))??[]}),[t,m]),_=VU((()=>"patterns"===i),[i]),S=VU((()=>"library"===i),[i]);return Mn.jsxs(bn,{direction:"vertical",className:"yaymail-customizer-tab-content yaymail-customizer-tab-elements",children:["patterns"!==i&&Mn.jsx(bb,{className:"yaymail-custom-search",placeholder:c,onChange:e=>{d(e.target.value)},size:"small",value:u,suffix:g?Mn.jsx(BL,{onClick:e=>(e=>{e.stopPropagation(),d("")})(e)}):Mn.jsx(sD,{})}),g&&y.length>0&&Mn.jsx(zU,{className:"search-result",items:[{key:"search-result",children:s?s(y):Mn.jsx(pU,{elements:y})}],activeKey:"search-result"}),g&&0===y.length&&Mn.jsx(kn,{className:"empty-search-result",image:kn.PRESENTED_IMAGE_SIMPLE,description:Mn.jsx("span",{className:"empty-search-result__message",children:l})}),!g&&Mn.jsx(zU,{items:C,onChange:e=>{null==b||b(e);const n=t.filter((t=>{var n;return e.includes(wE(t.group))&&(null==(n=t.status_info)?void 0:n.text.includes(__("New","yaymail")))&&!(null==m?void 0:m.includes(t.type))}));if(n.length>0&&(window.jQuery.ajax({method:"POST",url:window.yaymailData.admin_ajax.url,data:{action:"yaymail_dismiss_new_element_notification",nonce:window.yaymailData.admin_ajax.nonce,elements:n.map((e=>e.type))}}),f(Array.from(new Set([...m,...n.map((e=>e.type))])))),"patterns"===i){const n=e=>{var t;const n=JSON.stringify(e).replace(/[[\]"]+/g,"");document.querySelectorAll(".is-selected").forEach((e=>{e.classList.remove("yaymail-collapse-item-active","is-selected")})),null==(t=document.querySelector(`.yaymail-collapse-${n}-item`))||t.classList.add("yaymail-collapse-item-active","is-selected")};(e=>{const n=JSON.stringify(e).replace(/[[\]"]+/g,""),i=t.filter((e=>e.type==n));null==w||w(),null==x||x(i[0])})(e),0!==Object.keys(e).length&&n(e),"patterns"!==h&&p("patterns")}},activeKey:S?"user_saved_patterns":_?[]:v,className:_?"yaymail-pattern-collapses":""})]})},UU=window.React.useMemo,YU=()=>{const e=hM((e=>e.elements)),t=UU((()=>[{key:"basic",label:__("Basic","yaymail")},{key:"general",label:__("General","yaymail")},{key:"woocommerce",label:__("WooCommerce","yaymail")},{key:"block",label:Mn.jsxs(Mn.Fragment,{children:[Mn.jsx("span",{className:"yaymail-collapse-item-name",children:__("Blocks","yaymail")}),Mn.jsx("span",{className:"yaymail-collapse-item-name-badge",children:Mn.jsx(hW,{})})]})}]),[]),n=UU((()=>[...new Set(e.map((e=>e.group)))].filter((e=>"hidden"!==e&&!t.some((t=>t.key===e)))).map((e=>({key:wE(e),label:__(e.charAt(0).toUpperCase()+e.slice(1))})))),[e,t]),i=n.length>0?[...t,...n]:t;return Mn.jsx(WU,{allSearchableElements:e,groups:i})},ZU=()=>{const e=Object.values(window.yaymailData.builder.section_templates),t=[{key:"header",label:__("Header","yaymail")},{key:"footer",label:__("Footer","yaymail")},{key:"banner",label:__("Banner","yaymail")},{key:"gallery",label:__("Gallery","yaymail")},{key:"shipping",label:__("Shipping","yaymail")},{key:"offer",label:__("Offer","yaymail")},{key:"intro",label:__("Intro","yaymail")}];return Mn.jsx(WU,{allSearchableElements:e,groups:t,tabFor:"patterns",itemClass:"yaymail-section-template"})};var GU,qU;function KU(){return GU.apply(null,arguments)}function QU(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function XU(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function JU(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function eY(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(JU(e,t))return!1;return!0}function tY(e){return void 0===e}function nY(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function iY(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function oY(e,t){var n,i=[],o=e.length;for(n=0;n>>0;for(t=0;t0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+i}KU.suppressDeprecationWarnings=!1,KU.deprecationHandler=null,yY=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)JU(e,t)&&n.push(t);return n};var SY=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,kY=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,EY={},$Y={};function MY(e,t,n,i){var o=i;"string"==typeof i&&(o=function(){return this[i]()}),e&&($Y[e]=o),t&&($Y[t[0]]=function(){return _Y(o.apply(this,arguments),t[1],t[2])}),n&&($Y[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function RY(e,t){return e.isValid()?(t=AY(t,e.localeData()),EY[t]=EY[t]||function(e){var t,n,i,o=e.match(SY);for(t=0,n=o.length;t=0&&kY.test(e);)e=e.replace(kY,i),kY.lastIndex=0,n-=1;return e}var OY={};function jY(e,t){var n=e.toLowerCase();OY[n]=OY[n+"s"]=OY[t]=e}function TY(e){return"string"==typeof e?OY[e]||OY[e.toLowerCase()]:void 0}function NY(e){var t,n,i={};for(n in e)JU(e,n)&&(t=TY(n))&&(i[t]=e[n]);return i}var LY={};function IY(e,t){LY[e]=t}function DY(e){return e%4==0&&e%100!=0||e%400==0}function HY(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function PY(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=HY(t)),n}function zY(e,t){return function(n){return null!=n?(VY(this,e,n),KU.updateOffset(this,t),this):FY(this,e)}}function FY(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function VY(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&DY(e.year())&&1===e.month()&&29===e.date()?(n=PY(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),mZ(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var BY,WY=/\d/,UY=/\d\d/,YY=/\d{3}/,ZY=/\d{4}/,GY=/[+-]?\d{6}/,qY=/\d\d?/,KY=/\d\d\d\d?/,QY=/\d\d\d\d\d\d?/,XY=/\d{1,3}/,JY=/\d{1,4}/,eZ=/[+-]?\d{1,6}/,tZ=/\d+/,nZ=/[+-]?\d+/,iZ=/Z|[+-]\d\d:?\d\d/gi,oZ=/Z|[+-]\d\d(?::?\d\d)?/gi,rZ=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function aZ(e,t,n){BY[e]=wY(t)?t:function(e,i){return e&&n?n:t}}function sZ(e,t){return JU(BY,e)?BY[e](t._strict,t._locale):new RegExp(lZ(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,i,o){return t||n||i||o}))))}function lZ(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}BY={};var cZ,uZ={};function dZ(e,t){var n,i,o=t;for("string"==typeof e&&(e=[e]),nY(t)&&(o=function(e,n){n[t]=PY(e)}),i=e.length,n=0;n68?1900:2e3)};var kZ=zY("FullYear",!0);function EZ(e,t,n,i,o,r,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,i,o,r,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,i,o,r,a),s}function $Z(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function MZ(e,t,n){var i=7+t-n;return-(7+$Z(e,0,i).getUTCDay()-t)%7+i-1}function RZ(e,t,n,i,o){var r,a,s=1+7*(t-1)+(7+n-i)%7+MZ(e,i,o);return s<=0?a=SZ(r=e-1)+s:s>SZ(e)?(r=e+1,a=s-SZ(e)):(r=e,a=s),{year:r,dayOfYear:a}}function AZ(e,t,n){var i,o,r=MZ(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?i=a+OZ(o=e.year()-1,t,n):a>OZ(e.year(),t,n)?(i=a-OZ(e.year(),t,n),o=e.year()+1):(o=e.year(),i=a),{week:i,year:o}}function OZ(e,t,n){var i=MZ(e,t,n),o=MZ(e+1,t,n);return(SZ(e)-i+o)/7}function jZ(e,t){return e.slice(t,7).concat(e.slice(0,t))}MY("w",["ww",2],"wo","week"),MY("W",["WW",2],"Wo","isoWeek"),jY("week","w"),jY("isoWeek","W"),IY("week",5),IY("isoWeek",5),aZ("w",qY),aZ("ww",qY,UY),aZ("W",qY),aZ("WW",qY,UY),hZ(["w","ww","W","WW"],(function(e,t,n,i){t[i.substr(0,1)]=PY(e)})),MY("d",0,"do","day"),MY("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),MY("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),MY("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),MY("e",0,0,"weekday"),MY("E",0,0,"isoWeekday"),jY("day","d"),jY("weekday","e"),jY("isoWeekday","E"),IY("day",11),IY("weekday",11),IY("isoWeekday",11),aZ("d",qY),aZ("e",qY),aZ("E",qY),aZ("dd",(function(e,t){return t.weekdaysMinRegex(e)})),aZ("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),aZ("dddd",(function(e,t){return t.weekdaysRegex(e)})),hZ(["dd","ddd","dddd"],(function(e,t,n,i){var o=n._locale.weekdaysParse(e,i,n._strict);null!=o?t.d=o:sY(n).invalidWeekday=e})),hZ(["d","e","E"],(function(e,t,n,i){t[i]=PY(e)}));var TZ="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),NZ="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),LZ="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),IZ=rZ,DZ=rZ,HZ=rZ;function PZ(e,t,n){var i,o,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)r=aY([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=cZ.call(this._weekdaysParse,a))?o:null:"ddd"===t?-1!==(o=cZ.call(this._shortWeekdaysParse,a))?o:null:-1!==(o=cZ.call(this._minWeekdaysParse,a))?o:null:"dddd"===t?-1!==(o=cZ.call(this._weekdaysParse,a))||-1!==(o=cZ.call(this._shortWeekdaysParse,a))||-1!==(o=cZ.call(this._minWeekdaysParse,a))?o:null:"ddd"===t?-1!==(o=cZ.call(this._shortWeekdaysParse,a))||-1!==(o=cZ.call(this._weekdaysParse,a))||-1!==(o=cZ.call(this._minWeekdaysParse,a))?o:null:-1!==(o=cZ.call(this._minWeekdaysParse,a))||-1!==(o=cZ.call(this._weekdaysParse,a))||-1!==(o=cZ.call(this._shortWeekdaysParse,a))?o:null}function zZ(){function e(e,t){return t.length-e.length}var t,n,i,o,r,a=[],s=[],l=[],c=[];for(t=0;t<7;t++)n=aY([2e3,1]).day(t),i=lZ(this.weekdaysMin(n,"")),o=lZ(this.weekdaysShort(n,"")),r=lZ(this.weekdays(n,"")),a.push(i),s.push(o),l.push(r),c.push(i),c.push(o),c.push(r);a.sort(e),s.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function FZ(){return this.hours()%12||12}function VZ(e,t){MY(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function BZ(e,t){return t._meridiemParse}MY("H",["HH",2],0,"hour"),MY("h",["hh",2],0,FZ),MY("k",["kk",2],0,(function(){return this.hours()||24})),MY("hmm",0,0,(function(){return""+FZ.apply(this)+_Y(this.minutes(),2)})),MY("hmmss",0,0,(function(){return""+FZ.apply(this)+_Y(this.minutes(),2)+_Y(this.seconds(),2)})),MY("Hmm",0,0,(function(){return""+this.hours()+_Y(this.minutes(),2)})),MY("Hmmss",0,0,(function(){return""+this.hours()+_Y(this.minutes(),2)+_Y(this.seconds(),2)})),VZ("a",!0),VZ("A",!1),jY("hour","h"),IY("hour",13),aZ("a",BZ),aZ("A",BZ),aZ("H",qY),aZ("h",qY),aZ("k",qY),aZ("HH",qY,UY),aZ("hh",qY,UY),aZ("kk",qY,UY),aZ("hmm",KY),aZ("hmmss",QY),aZ("Hmm",KY),aZ("Hmmss",QY),dZ(["H","HH"],3),dZ(["k","kk"],(function(e,t,n){var i=PY(e);t[3]=24===i?0:i})),dZ(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),dZ(["h","hh"],(function(e,t,n){t[3]=PY(e),sY(n).bigHour=!0})),dZ("hmm",(function(e,t,n){var i=e.length-2;t[3]=PY(e.substr(0,i)),t[4]=PY(e.substr(i)),sY(n).bigHour=!0})),dZ("hmmss",(function(e,t,n){var i=e.length-4,o=e.length-2;t[3]=PY(e.substr(0,i)),t[4]=PY(e.substr(i,2)),t[5]=PY(e.substr(o)),sY(n).bigHour=!0})),dZ("Hmm",(function(e,t,n){var i=e.length-2;t[3]=PY(e.substr(0,i)),t[4]=PY(e.substr(i))})),dZ("Hmmss",(function(e,t,n){var i=e.length-4,o=e.length-2;t[3]=PY(e.substr(0,i)),t[4]=PY(e.substr(i,2)),t[5]=PY(e.substr(o))}));var WZ,UZ=zY("Hours",!0),YZ={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{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"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:fZ,monthsShort:gZ,week:{dow:0,doy:6},weekdays:TZ,weekdaysMin:LZ,weekdaysShort:NZ,meridiemParse:/[ap]\.?m?\.?/i},ZZ={},GZ={};function qZ(e,t){var n,i=Math.min(e.length,t.length);for(n=0;n0;){if(i=QZ(o.slice(0,t).join("-")))return i;if(n&&n.length>=t&&qZ(o,n)>=t-1)break;t--}r++}return WZ}(e)}function tG(e){var t,n=e._a;return n&&-2===sY(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>mZ(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,sY(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),sY(e)._overflowWeeks&&-1===t&&(t=7),sY(e)._overflowWeekday&&-1===t&&(t=8),sY(e).overflow=t),e}var nG=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,iG=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,oG=/Z|[+-]\d\d(?::?\d\d)?/,rG=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],aG=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],sG=/^\/?Date\((-?\d+)/i,lG=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,cG={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function uG(e){var t,n,i,o,r,a,s=e._i,l=nG.exec(s)||iG.exec(s),c=rG.length,u=aG.length;if(l){for(sY(e).iso=!0,t=0,n=c;t7)&&(l=!0)):(r=e._locale._week.dow,a=e._locale._week.doy,c=AZ(vG(),r,a),n=pG(t.gg,e._a[0],c.year),i=pG(t.w,c.week),null!=t.d?((o=t.d)<0||o>6)&&(l=!0):null!=t.e?(o=t.e+r,(t.e<0||t.e>6)&&(l=!0)):o=r),i<1||i>OZ(n,r,a)?sY(e)._overflowWeeks=!0:null!=l?sY(e)._overflowWeekday=!0:(s=RZ(n,i,o,r,a),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(r=pG(e._a[0],i[0]),(e._dayOfYear>SZ(r)||0===e._dayOfYear)&&(sY(e)._overflowDayOfYear=!0),n=$Z(r,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=i[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?$Z:EZ).apply(null,a),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(sY(e).weekdayMismatch=!0)}}function fG(e){if(e._f!==KU.ISO_8601)if(e._f!==KU.RFC_2822){e._a=[],sY(e).empty=!0;var t,n,i,o,r,a,s,l=""+e._i,c=l.length,u=0;for(s=(i=AY(e._f,e._locale).match(SY)||[]).length,t=0;t0&&sY(e).unusedInput.push(r),l=l.slice(l.indexOf(n)+n.length),u+=n.length),$Y[o]?(n?sY(e).empty=!1:sY(e).unusedTokens.push(o),pZ(o,n,e)):e._strict&&!n&&sY(e).unusedTokens.push(o);sY(e).charsLeftOver=c-u,l.length>0&&sY(e).unusedInput.push(l),e._a[3]<=12&&!0===sY(e).bigHour&&e._a[3]>0&&(sY(e).bigHour=void 0),sY(e).parsedDateParts=e._a.slice(0),sY(e).meridiem=e._meridiem,e._a[3]=(d=e._locale,h=e._a[3],null==(p=e._meridiem)?h:null!=d.meridiemHour?d.meridiemHour(h,p):null!=d.isPM?((m=d.isPM(p))&&h<12&&(h+=12),m||12!==h||(h=0),h):h),null!==(a=sY(e).era)&&(e._a[0]=e._locale.erasConvertYear(a,e._a[0])),mG(e),tG(e)}else hG(e);else uG(e);var d,h,p,m}function gG(e){var t=e._i,n=e._f;return e._locale=e._locale||eG(e._l),null===t||void 0===n&&""===t?cY({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),mY(t)?new pY(tG(t)):(iY(t)?e._d=t:QU(n)?function(e){var t,n,i,o,r,a,s=!1,l=e._f.length;if(0===l)return sY(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;othis?this:e:cY()}));function xG(e,t){var n,i;if(1===t.length&&QU(t[0])&&(t=t[0]),!t.length)return vG();for(n=t[0],i=1;i=0?new Date(e+400,t,n)-qG:new Date(e,t,n).valueOf()}function XG(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-qG:Date.UTC(e,t,n)}function JG(e,t){return t.erasAbbrRegex(e)}function eq(){var e,t,n=[],i=[],o=[],r=[],a=this.eras();for(e=0,t=a.length;e(r=OZ(e,i,o))&&(t=r),iq.call(this,e,t,n,i,o))}function iq(e,t,n,i,o){var r=RZ(e,t,n,i,o),a=$Z(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}MY("N",0,0,"eraAbbr"),MY("NN",0,0,"eraAbbr"),MY("NNN",0,0,"eraAbbr"),MY("NNNN",0,0,"eraName"),MY("NNNNN",0,0,"eraNarrow"),MY("y",["y",1],"yo","eraYear"),MY("y",["yy",2],0,"eraYear"),MY("y",["yyy",3],0,"eraYear"),MY("y",["yyyy",4],0,"eraYear"),aZ("N",JG),aZ("NN",JG),aZ("NNN",JG),aZ("NNNN",(function(e,t){return t.erasNameRegex(e)})),aZ("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),dZ(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,i){var o=n._locale.erasParse(e,i,n._strict);o?sY(n).era=o:sY(n).invalidEra=e})),aZ("y",tZ),aZ("yy",tZ),aZ("yyy",tZ),aZ("yyyy",tZ),aZ("yo",(function(e,t){return t._eraYearOrdinalRegex||tZ})),dZ(["y","yy","yyy","yyyy"],0),dZ(["yo"],(function(e,t,n,i){var o;n._locale._eraYearOrdinalRegex&&(o=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[0]=n._locale.eraYearOrdinalParse(e,o):t[0]=parseInt(e,10)})),MY(0,["gg",2],0,(function(){return this.weekYear()%100})),MY(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),tq("gggg","weekYear"),tq("ggggg","weekYear"),tq("GGGG","isoWeekYear"),tq("GGGGG","isoWeekYear"),jY("weekYear","gg"),jY("isoWeekYear","GG"),IY("weekYear",1),IY("isoWeekYear",1),aZ("G",nZ),aZ("g",nZ),aZ("GG",qY,UY),aZ("gg",qY,UY),aZ("GGGG",JY,ZY),aZ("gggg",JY,ZY),aZ("GGGGG",eZ,GY),aZ("ggggg",eZ,GY),hZ(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,i){t[i.substr(0,2)]=PY(e)})),hZ(["gg","GG"],(function(e,t,n,i){t[i]=KU.parseTwoDigitYear(e)})),MY("Q",0,"Qo","quarter"),jY("quarter","Q"),IY("quarter",7),aZ("Q",WY),dZ("Q",(function(e,t){t[1]=3*(PY(e)-1)})),MY("D",["DD",2],"Do","date"),jY("date","D"),IY("date",9),aZ("D",qY),aZ("DD",qY,UY),aZ("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),dZ(["D","DD"],2),dZ("Do",(function(e,t){t[2]=PY(e.match(qY)[0])}));var oq=zY("Date",!0);MY("DDD",["DDDD",3],"DDDo","dayOfYear"),jY("dayOfYear","DDD"),IY("dayOfYear",4),aZ("DDD",XY),aZ("DDDD",YY),dZ(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=PY(e)})),MY("m",["mm",2],0,"minute"),jY("minute","m"),IY("minute",14),aZ("m",qY),aZ("mm",qY,UY),dZ(["m","mm"],4);var rq=zY("Minutes",!1);MY("s",["ss",2],0,"second"),jY("second","s"),IY("second",15),aZ("s",qY),aZ("ss",qY,UY),dZ(["s","ss"],5);var aq,sq,lq=zY("Seconds",!1);for(MY("S",0,0,(function(){return~~(this.millisecond()/100)})),MY(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),MY(0,["SSS",3],0,"millisecond"),MY(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),MY(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),MY(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),MY(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),MY(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),MY(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),jY("millisecond","ms"),IY("millisecond",16),aZ("S",XY,WY),aZ("SS",XY,UY),aZ("SSS",XY,YY),aq="SSSS";aq.length<=9;aq+="S")aZ(aq,tZ);function cq(e,t){t[6]=PY(1e3*("0."+e))}for(aq="S";aq.length<=9;aq+="S")dZ(aq,cq);sq=zY("Milliseconds",!1),MY("z",0,0,"zoneAbbr"),MY("zz",0,0,"zoneName");var uq=pY.prototype;function dq(e){return e}uq.add=PG,uq.calendar=function(e,t){var n;1===arguments.length&&(arguments[0]?mY(n=arguments[0])||iY(n)||FG(n)||nY(n)||function(e){var t=QU(e),n=!1;return t&&(n=0===e.filter((function(t){return!nY(t)&&FG(e)})).length),t&&n}(n)||function(e){var t,n=XU(e)&&!eY(e),i=!1,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],r=o.length;for(t=0;tn.valueOf():n.valueOf()9999?RY(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):wY(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",RY(n,"Z")):RY(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},uq.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,i="moment",o="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=o+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(uq[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),uq.toJSON=function(){return this.isValid()?this.toISOString():null},uq.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},uq.unix=function(){return Math.floor(this.valueOf()/1e3)},uq.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},uq.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},uq.eraName=function(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;ethis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},uq.isLocal=function(){return!!this.isValid()&&!this._isUTC},uq.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},uq.isUtc=OG,uq.isUTC=OG,uq.zoneAbbr=function(){return this._isUTC?"UTC":""},uq.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},uq.dates=gY("dates accessor is deprecated. Use date instead.",oq),uq.months=gY("months accessor is deprecated. Use month instead",CZ),uq.years=gY("years accessor is deprecated. Use year instead",kZ),uq.zone=gY("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),uq.isDSTShifted=gY("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!tY(this._isDSTShifted))return this._isDSTShifted;var e,t={};return hY(t,this),(t=gG(t))._a?(e=t._isUTC?aY(t._a):vG(t._a),this._isDSTShifted=this.isValid()&&function(e,t){var n,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),r=0;for(n=0;n0):this._isDSTShifted=!1,this._isDSTShifted}));var hq=CY.prototype;function pq(e,t,n,i){var o=eG(),r=aY().set(i,t);return o[n](r,e)}function mq(e,t,n){if(nY(e)&&(t=e,e=void 0),e=e||"",null!=t)return pq(e,t,n,"month");var i,o=[];for(i=0;i<12;i++)o[i]=pq(e,i,n,"month");return o}function fq(e,t,n,i){"boolean"==typeof e?(nY(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,nY(t)&&(n=t,t=void 0),t=t||"");var o,r=eG(),a=e?r._week.dow:0,s=[];if(null!=n)return pq(t,(n+a)%7,i,"day");for(o=0;o<7;o++)s[o]=pq(t,(o+a)%7,i,"day");return s}hq.calendar=function(e,t,n){var i=this._calendar[e]||this._calendar.sameElse;return wY(i)?i.call(t,n):i},hq.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(SY).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},hq.invalidDate=function(){return this._invalidDate},hq.ordinal=function(e){return this._ordinal.replace("%d",e)},hq.preparse=dq,hq.postformat=dq,hq.relativeTime=function(e,t,n,i){var o=this._relativeTime[n];return wY(o)?o(e,t,n,i):o.replace(/%d/i,e)},hq.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return wY(n)?n(t):n.replace(/%s/i,t)},hq.set=function(e){var t,n;for(n in e)JU(e,n)&&(wY(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},hq.eras=function(e,t){var n,i,o,r=this._eras||eG("en")._eras;for(n=0,i=r.length;n=0)return l[i]},hq.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?KU(e.since).year():KU(e.since).year()+(t-e.offset)*n},hq.erasAbbrRegex=function(e){return JU(this,"_erasAbbrRegex")||eq.call(this),e?this._erasAbbrRegex:this._erasRegex},hq.erasNameRegex=function(e){return JU(this,"_erasNameRegex")||eq.call(this),e?this._erasNameRegex:this._erasRegex},hq.erasNarrowRegex=function(e){return JU(this,"_erasNarrowRegex")||eq.call(this),e?this._erasNarrowRegex:this._erasRegex},hq.months=function(e,t){return e?QU(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||yZ).test(t)?"format":"standalone"][e.month()]:QU(this._months)?this._months:this._months.standalone},hq.monthsShort=function(e,t){return e?QU(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[yZ.test(t)?"format":"standalone"][e.month()]:QU(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},hq.monthsParse=function(e,t,n){var i,o,r;if(this._monthsParseExact)return wZ.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(o=aY([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(r="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[i]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[i].test(e))return i;if(n&&"MMM"===t&&this._shortMonthsParse[i].test(e))return i;if(!n&&this._monthsParse[i].test(e))return i}},hq.monthsRegex=function(e){return this._monthsParseExact?(JU(this,"_monthsRegex")||_Z.call(this),e?this._monthsStrictRegex:this._monthsRegex):(JU(this,"_monthsRegex")||(this._monthsRegex=bZ),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},hq.monthsShortRegex=function(e){return this._monthsParseExact?(JU(this,"_monthsRegex")||_Z.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(JU(this,"_monthsShortRegex")||(this._monthsShortRegex=vZ),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},hq.week=function(e){return AZ(e,this._week.dow,this._week.doy).week},hq.firstDayOfYear=function(){return this._week.doy},hq.firstDayOfWeek=function(){return this._week.dow},hq.weekdays=function(e,t){var n=QU(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?jZ(n,this._week.dow):e?n[e.day()]:n},hq.weekdaysMin=function(e){return!0===e?jZ(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},hq.weekdaysShort=function(e){return!0===e?jZ(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},hq.weekdaysParse=function(e,t,n){var i,o,r;if(this._weekdaysParseExact)return PZ.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(o=aY([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(r="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[i]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(n&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(n&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!n&&this._weekdaysParse[i].test(e))return i}},hq.weekdaysRegex=function(e){return this._weekdaysParseExact?(JU(this,"_weekdaysRegex")||zZ.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(JU(this,"_weekdaysRegex")||(this._weekdaysRegex=IZ),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},hq.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(JU(this,"_weekdaysRegex")||zZ.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(JU(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=DZ),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},hq.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(JU(this,"_weekdaysRegex")||zZ.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(JU(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=HZ),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},hq.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},hq.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},XZ("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===PY(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),KU.lang=gY("moment.lang is deprecated. Use moment.locale instead.",XZ),KU.langData=gY("moment.langData is deprecated. Use moment.localeData instead.",eG);var gq=Math.abs;function yq(e,t,n,i){var o=NG(t,n);return e._milliseconds+=i*o._milliseconds,e._days+=i*o._days,e._months+=i*o._months,e._bubble()}function vq(e){return e<0?Math.floor(e):Math.ceil(e)}function bq(e){return 4800*e/146097}function wq(e){return 146097*e/4800}function xq(e){return function(){return this.as(e)}}var Cq=xq("ms"),_q=xq("s"),Sq=xq("m"),kq=xq("h"),Eq=xq("d"),$q=xq("w"),Mq=xq("M"),Rq=xq("Q"),Aq=xq("y");function Oq(e){return function(){return this.isValid()?this._data[e]:NaN}}var jq=Oq("milliseconds"),Tq=Oq("seconds"),Nq=Oq("minutes"),Lq=Oq("hours"),Iq=Oq("days"),Dq=Oq("months"),Hq=Oq("years"),Pq=Math.round,zq={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Fq(e,t,n,i,o){return o.relativeTime(t||1,!!n,e,i)}var Vq=Math.abs;function Bq(e){return(e>0)-(e<0)||+e}function Wq(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,i,o,r,a,s,l=Vq(this._milliseconds)/1e3,c=Vq(this._days),u=Vq(this._months),d=this.asSeconds();return d?(e=HY(l/60),t=HY(e/60),l%=60,e%=60,n=HY(u/12),u%=12,i=l?l.toFixed(3).replace(/\.?0+$/,""):"",o=d<0?"-":"",r=Bq(this._months)!==Bq(d)?"-":"",a=Bq(this._days)!==Bq(d)?"-":"",s=Bq(this._milliseconds)!==Bq(d)?"-":"",o+"P"+(n?r+n+"Y":"")+(u?r+u+"M":"")+(c?a+c+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+i+"S":"")):"P0D"}var Uq=_G.prototype;Uq.isValid=function(){return this._isValid},Uq.abs=function(){var e=this._data;return this._milliseconds=gq(this._milliseconds),this._days=gq(this._days),this._months=gq(this._months),e.milliseconds=gq(e.milliseconds),e.seconds=gq(e.seconds),e.minutes=gq(e.minutes),e.hours=gq(e.hours),e.months=gq(e.months),e.years=gq(e.years),this},Uq.add=function(e,t){return yq(this,e,t,1)},Uq.subtract=function(e,t){return yq(this,e,t,-1)},Uq.as=function(e){if(!this.isValid())return NaN;var t,n,i=this._milliseconds;if("month"===(e=TY(e))||"quarter"===e||"year"===e)switch(t=this._days+i/864e5,n=this._months+bq(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(wq(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}},Uq.asMilliseconds=Cq,Uq.asSeconds=_q,Uq.asMinutes=Sq,Uq.asHours=kq,Uq.asDays=Eq,Uq.asWeeks=$q,Uq.asMonths=Mq,Uq.asQuarters=Rq,Uq.asYears=Aq,Uq.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*PY(this._months/12):NaN},Uq._bubble=function(){var e,t,n,i,o,r=this._milliseconds,a=this._days,s=this._months,l=this._data;return r>=0&&a>=0&&s>=0||r<=0&&a<=0&&s<=0||(r+=864e5*vq(wq(s)+a),a=0,s=0),l.milliseconds=r%1e3,e=HY(r/1e3),l.seconds=e%60,t=HY(e/60),l.minutes=t%60,n=HY(t/60),l.hours=n%24,a+=HY(n/24),s+=o=HY(bq(a)),a-=vq(wq(o)),i=HY(s/12),s%=12,l.days=a,l.months=s,l.years=i,this},Uq.clone=function(){return NG(this)},Uq.get=function(e){return e=TY(e),this.isValid()?this[e+"s"]():NaN},Uq.milliseconds=jq,Uq.seconds=Tq,Uq.minutes=Nq,Uq.hours=Lq,Uq.days=Iq,Uq.weeks=function(){return HY(this.days()/7)},Uq.months=Dq,Uq.years=Hq,Uq.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,i,o=!1,r=zq;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(o=e),"object"==typeof t&&(r=Object.assign({},zq,t),null!=t.s&&null==t.ss&&(r.ss=t.s-1)),i=function(e,t,n,i){var o=NG(e).abs(),r=Pq(o.as("s")),a=Pq(o.as("m")),s=Pq(o.as("h")),l=Pq(o.as("d")),c=Pq(o.as("M")),u=Pq(o.as("w")),d=Pq(o.as("y")),h=r<=n.ss&&["s",r]||r0,h[4]=i,Fq.apply(null,h)}(this,!o,r,n=this.localeData()),o&&(i=n.pastFuture(+this,i)),n.postformat(i)},Uq.toISOString=Wq,Uq.toString=Wq,Uq.toJSON=Wq,Uq.locale=BG,Uq.localeData=UG,Uq.toIsoString=gY("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Wq),Uq.lang=WG,MY("X",0,0,"unix"),MY("x",0,0,"valueOf"),aZ("x",nZ),aZ("X",/[+-]?\d+(\.\d{1,3})?/),dZ("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),dZ("x",(function(e,t,n){n._d=new Date(PY(e))})),KU.version="2.29.4",GU=vG,KU.fn=uq,KU.min=function(){return xG("isBefore",[].slice.call(arguments,0))},KU.max=function(){return xG("isAfter",[].slice.call(arguments,0))},KU.now=function(){return Date.now?Date.now():+new Date},KU.utc=aY,KU.unix=function(e){return vG(1e3*e)},KU.months=function(e,t){return mq(e,t,"months")},KU.isDate=iY,KU.locale=XZ,KU.invalid=cY,KU.duration=NG,KU.isMoment=mY,KU.weekdays=function(e,t,n){return fq(e,t,n,"weekdays")},KU.parseZone=function(){return vG.apply(null,arguments).parseZone()},KU.localeData=eG,KU.isDuration=SG,KU.monthsShort=function(e,t){return mq(e,t,"monthsShort")},KU.weekdaysMin=function(e,t,n){return fq(e,t,n,"weekdaysMin")},KU.defineLocale=JZ,KU.updateLocale=function(e,t){if(null!=t){var n,i,o=YZ;null!=ZZ[e]&&null!=ZZ[e].parentLocale?ZZ[e].set(xY(ZZ[e]._config,t)):(null!=(i=QZ(e))&&(o=i._config),t=xY(o,t),null==i&&(t.abbr=e),(n=new CY(t)).parentLocale=ZZ[e],ZZ[e]=n),XZ(e)}else null!=ZZ[e]&&(null!=ZZ[e].parentLocale?(ZZ[e]=ZZ[e].parentLocale,e===XZ()&&XZ(e)):null!=ZZ[e]&&delete ZZ[e]);return ZZ[e]},KU.locales=function(){return yY(ZZ)},KU.weekdaysShort=function(e,t,n){return fq(e,t,n,"weekdaysShort")},KU.normalizeUnits=TY,KU.relativeTimeRounding=function(e){return void 0===e?Pq:"function"==typeof e&&(Pq=e,!0)},KU.relativeTimeThreshold=function(e,t){return void 0!==zq[e]&&(void 0===t?zq[e]:(zq[e]=t,"s"===e&&(zq.ss=t-1),!0))},KU.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},KU.prototype=uq,KU.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const Yq=[{revision_id:1,modified_by:"John Doe",modified_at:new Date(Date.now()-36e5)},{revision_id:2,modified_by:"Jane Doe",modified_at:new Date(Date.now()-72e5)},{revision_id:3,modified_by:"John Doe",modified_at:new Date(Date.now()-144e5)},{revision_id:4,modified_by:"Jane Doe",modified_at:new Date(Date.now()-216e5)},{revision_id:5,modified_by:"John Doe",modified_at:new Date(Date.now()-288e5)}],Zq=()=>Mn.jsx(Mn.Fragment,{children:Mn.jsxs("section",{className:"yaymail-list-revisions",children:[Mn.jsx("div",{className:"yaymail-list-revisions__items",children:null==Yq?void 0:Yq.map((e=>{const{revision_id:t,modified_by:n,modified_at:i}=e;return Mn.jsx("div",{className:_$("yaymail-list-revisions__items__item"),children:Mn.jsxs("div",{children:[Mn.jsxs("div",{children:[Mn.jsxs("span",{className:"yaymail-list-revisions__items__item__bold",children:[(o=i,function(e,t){let n=36e5,i=864e5,o=2592e6,r=31536e6,a=(new Date).getTime()-t.getTime();return 0==Math.round(a/1e3)?"Recently":a<6e4?Math.round(a/1e3)+" seconds ago":a{const e=hM((e=>e.updateTemplateSettings)),t=eM((e=>e.changeContentStatus)),{isTemplateExist:n}=CA(),i=eM((e=>e.changeListBackgroundColor)),o=eM((e=>e.changeListTextColor)),r=eM((e=>e.changeListTitleColor)),a=hM((e=>{var t;return(null==(t=e.templateData)?void 0:t.background_color)??window.yaymailData.colors.default_background_color})),s=hM((e=>{var t;return(null==(t=e.templateData)?void 0:t.content_background_color)??"#ffffff"})),l=hM((e=>{var t;return(null==(t=e.templateData)?void 0:t.content_text_color)??"#000000"})),c=hM((e=>{var t;return(null==(t=e.templateData)?void 0:t.text_link_color)??window.yaymailData.colors.default_text_link_color})),u=hM((e=>{var t;return(null==(t=e.templateData)?void 0:t.title_color)??"#000000"})),d=qq((n=>{e("background_color",n.toHexString()),t(!0)}),[e]),h=qq((n=>{const o=n.toHexString();e("content_background_color",o),i(o),t(!0)}),[e]),p=qq((n=>{e("content_text_color",n.toHexString()),o(n.toHexString()),t(!0)}),[e]),m=qq((n=>{const i=n.toHexString();e("title_color",i),r(i),t(!0)}),[e]),f=qq((n=>{e("text_link_color",n.toHexString()),t(!0)}),[e]);return Mn.jsxs(Mn.Fragment,{children:[Mn.jsx("div",{className:"yaymail-customizer-settings__email-settings",children:Mn.jsxs("div",{children:[Mn.jsx(Qq,{title:__("Background color","yaymail"),onChange:d,value:a,disabled:!n}),Mn.jsx(Qq,{title:__("Title color","yaymail"),onChange:m,value:u,disabled:!n}),Mn.jsx(Qq,{title:__("Content background color","yaymail"),onChange:h,value:s,disabled:!n}),Mn.jsx(Qq,{title:__("Content text color","yaymail"),onChange:p,value:l,disabled:!n}),Mn.jsx(Qq,{title:Mn.jsxs(Mn.Fragment,{children:[__("Text link color","yaymail"),Mn.jsx("p",{style:{marginBottom:2},className:"yaymail-general-setting-item__note",children:__("This will make a change to all elements in this email","yaymail")})]}),onChange:f,value:c,disabled:!n})]})}),Mn.jsx("div",{className:"yaymail-btn-save-wrapper",children:Mn.jsx(fB,{hasIcon:!1,text:__("Save template","yaymail"),btnClassName:"yaymail-btn--light",hasLoading:!0,disabled:!n,style:{minWidth:132}})})]})},Qq=Gq((function({onChange:e,title:t,value:n,disabled:i}){const o=qq(P$(e,0),[e]);return Mn.jsx(VH,{title:t,value:n,onChange:o,disabled:i})}),((e,t)=>e.title===t.title&&e.onChange===t.onChange&&e.value===t.value));var Xq={},Jq={},eK={exports:{}};!function(e){!function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,n,i){"string"==typeof e?(2==arguments.length&&(i=n),t.modules[e]||(t.payloads[e]=i,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n,i,o=function(e,t,n){if("string"==typeof t){var i=s(e,t);if(null!=i)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(t)){for(var o=[],a=0,l=t.length;an.length)&&(t=n.length),t-=e.length;var i=n.indexOf(e,t);return-1!==i&&i===t})),String.prototype.repeat||i(String.prototype,"repeat",(function(e){for(var t="",n=this;e>0;)1&e&&(t+=n),(e>>=1)&&(n+=n);return t})),String.prototype.includes||i(String.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Object.assign||(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n>>0,i=0|arguments[1],o=i<0?Math.max(n+i,0):Math.min(i,n),r=arguments[2],a=void 0===r?n:0|r,s=a<0?Math.max(n+a,0):Math.min(a,n);o0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var i=/^\s\s*/,o=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(i,"")},t.stringTrimRight=function(e){return e.replace(o,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,i=e.length;n65535?2:1}})),ace.define("ace/lib/useragent",["require","exports","module"],(function(e,t,n){t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var i="object"==typeof navigator?navigator:{},o=(/mac|win|linux/i.exec(i.platform)||["other"])[0].toLowerCase(),r=i.userAgent||"",a=i.appName||"";t.isWin="win"==o,t.isMac="mac"==o,t.isLinux="linux"==o,t.isIE="Microsoft Internet Explorer"==a||a.indexOf("MSAppHost")>=0?parseFloat((r.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((r.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=r.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(r.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(r.split(" Chrome/")[1])||void 0,t.isSafari=parseFloat(r.split(" Safari/")[1])&&!t.isChrome||void 0,t.isEdge=parseFloat(r.split(" Edge/")[1])||void 0,t.isAIR=r.indexOf("AdobeAIR")>=0,t.isAndroid=r.indexOf("Android")>=0,t.isChromeOS=r.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(r)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,n){var i,o=e("./useragent");t.buildDom=function e(t,n,i){if("string"==typeof t&&t){var o=document.createTextNode(t);return n&&n.appendChild(o),o}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var r=[],a=0;a=1.5,o.isChromeOS&&(t.HI_DPI=!1),"undefined"!=typeof document){var l=document.createElement("div");t.HI_DPI&&void 0!==l.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),o.isEdge||void 0===l.style.animationName||(t.HAS_CSS_ANIMATION=!0),l=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,n){var i=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=i.getDocumentHead(),o=document.createElement("script");o.src=e,n.appendChild(o),o.onload=o.onreadystatechange=function(e,n){!n&&o.readyState&&"loaded"!=o.readyState&&"complete"!=o.readyState||(o=o.onload=o.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,n){t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(e,t,n){var i={},o=function(){this.propagationStopped=!0},r=function(){this.defaultPrevented=!0};i._emit=i._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],i=this._defaultHandlers[e];if(n.length||i){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=o),t.preventDefault||(t.preventDefault=r),n=n.slice();for(var a=0;a1&&(o=n[n.length-2]);var a=l[t+"Path"];return null==a?a=l.basePath:"/"==i&&(t=i=""),a&&"/"!=a.slice(-1)&&(a+="/"),a+t+i+o+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.setLoader=function(e){s=e},t.dynamicModules=Object.create(null),t.$loading={},t.$loaded={},t.loadModule=function(n,i){var r;if(Array.isArray(n))var a=n[0],l=n[1];else"string"==typeof n&&(l=n);var u=function(n){if(n&&!t.$loading[l])return i&&i(n);if(t.$loading[l]||(t.$loading[l]=[]),t.$loading[l].push(i),!(t.$loading[l].length>1)){var r=function(){!function(t,n){"ace/theme/textmate"===t||"./theme/textmate"===t?n(0,e("./theme/textmate")):s?s(t,n):console.error("loader is not configured")}(l,(function(e,n){n&&(t.$loaded[l]=n),t._emit("load.module",{name:l,module:n});var i=t.$loading[l];t.$loading[l]=null,i.forEach((function(e){e&&e(n)}))}))};if(!t.get("packaged"))return r();o.loadScript(t.moduleUrl(l,a),r),c()}};if(t.dynamicModules[l])t.dynamicModules[l]().then((function(e){e.default?u(e.default):u(e)}));else{try{r=this.$require(l)}catch(d){}u(r||t.$loaded[l])}},t.$require=function(e){if("function"==typeof n.require)return n.require(e)},t.setModuleLoader=function(e,n){t.dynamicModules[e]=n};var c=function(){l.basePath||l.workerPath||l.modePath||l.themePath||Object.keys(l.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};t.version="1.43.3"})),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],(function(e,t,n){e("./lib/fixoldbrowsers");var i=e("./config");i.setLoader((function(t,n){e([t],(function(e){n(null,e)}))}));var o=function(){return this||"undefined"!=typeof window&&window}();function r(t){if(o&&o.document){i.set("packaged",t||e.packaged||n.packaged||o.define&&(void 0).packaged);var r={},a="",s=document.currentScript||document._currentScript,l=s&&s.ownerDocument||document;s&&s.src&&(a=s.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var c,u=l.getElementsByTagName("script"),d=0;d ["+this.end.row+"/"+this.end.column+"]"},e.prototype.contains=function(e,t){return 0==this.compare(e,t)},e.prototype.compareRange=function(e){var t,n=e.end,i=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(i.row,i.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(i.row,i.column))?-1:1==t?42:0},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},e.prototype.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},e.prototype.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},e.prototype.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},e.prototype.inside=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)&&!this.isStart(e,t)},e.prototype.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},e.prototype.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},e.prototype.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.clipRows=function(t,n){if(this.end.row>n)var i={row:n+1,column:0};else this.end.rown)var o={row:n+1,column:0};else this.start.row1?++d>4&&(d=1):d=1,r.isIE){var a=Math.abs(e.clientX-s)>5||Math.abs(e.clientY-l)>5;c&&!a||(d=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),n[d-1]||600),1==d&&(s=e.clientX,l=e.clientY)}if(e._clicks=d,i[o]("mousedown",e),d>4)d=0;else if(d>1)return i[o](h[d],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){u(e,"mousedown",p,a)}))},t.getModifierString=function(e){return o.KEY_MODS[h(e)]},t.addCommandKeyListener=function(e,n,i){var l=null;u(e,"keydown",(function(e){a[e.keyCode]=(a[e.keyCode]||0)+1;var t=function(e,t,n){var i=h(t);if(!n&&t.code&&(n=o.$codeToKeyCode[t.code]||n),!r.isMac&&a){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(i|=8),a.altGr){if(!(3&~i))return;a.altGr=0}if(18===n||17===n){var l=t.location;17===n&&1===l?1==a[n]&&(s=t.timeStamp):18===n&&3===i&&2===l&&t.timeStamp-s<50&&(a.altGr=!0)}}if(n in o.MODIFIER_KEYS&&(n=-1),i||13!==n||3!==t.location||(e(t,i,-n),!t.defaultPrevented)){if(r.isChromeOS&&8&i){if(e(t,i,n),t.defaultPrevented)return;i&=-9}return!!(i||n in o.FUNCTION_KEYS||n in o.PRINTABLE_KEYS)&&e(t,i,n)}}(n,e,e.keyCode);return l=e.defaultPrevented,t}),i),u(e,"keypress",(function(e){l&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),l=null)}),i),u(e,"keyup",(function(e){a[e.keyCode]=null}),i),a||(p(),u(window,"focus",p))},"object"==typeof window&&window.postMessage&&!r.isOldIE){var m=1;t.nextTick=function(e,n){n=n||window;var i="zero-timeout-message-"+m++,o=function(r){r.data==i&&(t.stopPropagation(r),d(n,"message",o),e())};u(n,"message",o),n.postMessage(i,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout((function n(){t.$idleBlocked?setTimeout(n,100):e()}),n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/clipboard",["require","exports","module"],(function(e,t,n){var i;n.exports={lineMode:!1,pasteCancelled:function(){return!!(i&&i>Date.now()-50)||(i=!1)},cancel:function(){i=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,n){var i=e("../lib/event"),o=e("../config").nls,r=e("../lib/useragent"),a=e("../lib/dom"),s=e("../lib/lang"),l=e("../clipboard"),c=r.isChrome<18,u=r.isIE,d=r.isChrome>63,h=400,p=e("../lib/keys"),m=p.KEY_MODS,f=r.isIOS,g=f?/\s/:/\n/,y=r.isMobile,v=function(){function e(e,t){var n=this;this.host=t,this.text=a.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",e.insertBefore(this.text,e.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",y||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch(o){}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),i.addListener(this.text,"blur",(function(e){n.ignoreFocusEvents||(t.onBlur(e),n.$isFocused=!1)}),t),i.addListener(this.text,"focus",(function(e){if(!n.ignoreFocusEvents){if(n.$isFocused=!0,r.isEdge)try{if(!document.hasFocus())return}catch(i){}t.onFocus(e),r.isEdge?setTimeout(n.resetSelection.bind(n)):n.resetSelection()}}),t),this.$focusScroll=!1,t.on("beforeEndOperation",(function(){var e=t.curOp,i=e&&e.command&&e.command.name;if("insertstring"!=i){var o=i&&(e.docChanged||e.selectionChanged);n.inComposition&&o&&(n.lastValue=n.text.value="",n.onCompositionEnd()),n.resetSelection()}})),t.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=f?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&t.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,i.addCommandKeyListener(this.text,(function(e,i,o){if(!n.inComposition)return t.onCommandKey(e,i,o)}),t),i.addListener(this.text,"select",this.onSelect.bind(this),t),i.addListener(this.text,"input",this.onInput.bind(this),t),i.addListener(this.text,"cut",this.onCut.bind(this),t),i.addListener(this.text,"copy",this.onCopy.bind(this),t),i.addListener(this.text,"paste",this.onPaste.bind(this),t),"oncut"in this.text&&"oncopy"in this.text&&"onpaste"in this.text||i.addListener(e,"keydown",(function(e){if((!r.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:n.onCopy(e);break;case 86:n.onPaste(e);break;case 88:n.onCut(e)}}),t),this.syncComposition=s.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),i.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),t),i.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),t),i.addListener(this.text,"keyup",this.onKeyup.bind(this),t),i.addListener(this.text,"keydown",this.syncComposition.bind(this),t),i.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),t),this.closeTimeout,i.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),t),i.addListener(this.text,"mousedown",(function(e){e.preventDefault(),n.onContextMenuClose()}),t),i.addListener(t.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),t),i.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),t),f&&this.addIosSelectionHandler(e,t,this.text)}return e.prototype.addIosSelectionHandler=function(e,t,n){var i=this,o=null,r=!1;n.addEventListener("keydown",(function(e){o&&clearTimeout(o),r=!0}),!0),n.addEventListener("keyup",(function(e){o=setTimeout((function(){r=!1}),100)}),!0);var a=function(e){if(document.activeElement===n&&!(r||i.inComposition||t.$mouseHandler.isMousePressed||i.copied)){var o=n.selectionStart,a=n.selectionEnd,s=null,l=0;if(0==o?s=p.up:1==o?s=p.home:a>i.lastSelectionEnd&&"\n"==i.lastValue[a]?s=p.end:oi.lastSelectionEnd&&i.lastValue.slice(0,a).split("\n").length>2?s=p.down:a>i.lastSelectionEnd&&" "==i.lastValue[a-1]?(s=p.right,l=m.option):(a>i.lastSelectionEnd||a==i.lastSelectionEnd&&i.lastSelectionEnd!=i.lastSelectionStart&&o==a)&&(s=p.right),o!==a&&(l|=m.shift),s){if(!t.onCommandKey({},l,s)&&t.commands){s=p.keyCodeToString(s);var c=t.commands.findKeyCommand(l,s);c&&t.execCommand(c)}i.lastSelectionStart=o,i.lastSelectionEnd=a,i.resetSelection("")}}};document.addEventListener("selectionchange",a),t.on("destroy",(function(){document.removeEventListener("selectionchange",a)}))},e.prototype.onContextMenuClose=function(){var e=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout((function(){e.tempStyle&&(e.text.style.cssText=e.tempStyle,e.tempStyle=""),e.host.renderer.$isMousePressed=!1,e.host.renderer.$keepTextAreaAtCursor&&e.host.renderer.$moveTextAreaToCursor()}),0)},e.prototype.$onContextMenu=function(e){this.host.textInput.onContextMenu(e),this.onContextMenuClose()},e.prototype.onKeyup=function(e){27==e.keyCode&&this.text.value.length500||g.test(n)||y&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},e.prototype.sendText=function(e,t){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),e&&this.host.onPaste(e),this.pasted=!1,"";for(var n=this.text.selectionStart,i=this.text.selectionEnd,o=this.lastSelectionStart,a=this.lastValue.length-this.lastSelectionEnd,s=e,l=e.length-n,c=e.length-i,u=0;o>0&&this.lastValue[u]==e[u];)u++,o--;for(s=s.slice(u),u=1;a>0&&this.lastValue.length-u>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-u]==e[e.length-u];)u++,a--;l-=u-1,c-=u-1;var d=s.length-u+1;if(d<0&&(o=-d,d=0),s=s.slice(0,d),!(t||s||l||o||a||c))return"";this.sendingText=!0;var h=!1;return r.isAndroid&&". "==s&&(s=" ",h=!0),s&&!o&&!a&&!l&&!c||this.commandMode?this.host.onTextInput(s):this.host.onTextInput(s,{extendLeft:o,extendRight:a,restoreStart:l,restoreEnd:c}),this.sendingText=!1,this.lastValue=e,this.lastSelectionStart=n,this.lastSelectionEnd=i,this.lastRestoreEnd=c,h?"\n":s},e.prototype.onSelect=function(e){var t,n=this;this.inComposition||(this.copied?this.copied=!1:0===(t=this.text).selectionStart&&t.selectionEnd>=n.lastValue.length&&t.value===n.lastValue&&n.lastValue&&t.selectionEnd!==n.lastSelectionEnd?(this.host.selectAll(),this.resetSelection()):y&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection())},e.prototype.$resetSelectionIOS=function(e){if(this.$isFocused&&(!this.copied||e)&&!this.sendingText){e||(e="");var t="\n ab"+e+"cde fg\n";t!=this.text.value&&(this.text.value=this.lastValue=t);var n=4+(e.length||(this.host.selection.isEmpty()?0:1));4==this.lastSelectionStart&&this.lastSelectionEnd==n||this.text.setSelectionRange(4,n),this.lastSelectionStart=4,this.lastSelectionEnd=n}},e.prototype.$resetSelection=function(){var e=this;if(!this.inComposition&&!this.sendingText&&(this.$isFocused||this.afterContextMenu)){this.inComposition=!0;var t=0,n=0,i="",o=function(t,n){for(var i=n,o=1;o<=t-e.rowStart&&o<2*e.numberOfExtraLines+1;o++)i+=e.host.session.getLine(t-o).length+1;return i};if(this.host.session){var r=this.host.selection,a=r.getRange(),s=r.cursor.row;s===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):s===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(sthis.rowEnd+1)&&(this.rowStart=s>this.numberOfExtraLines?s-this.numberOfExtraLines:0,this.rowEnd=s>this.numberOfExtraLines?s+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var l=[],c=this.rowStart;c<=this.rowEnd;c++)l.push(this.host.session.getLine(c));if(i=l.join("\n"),t=o(a.start.row,a.start.column),n=o(a.end.row,a.end.column),a.start.rowthis.rowEnd){var d=this.host.session.getLine(this.rowEnd+1);n=a.end.row>this.rowEnd+1?d.length:a.end.column,n+=i.length+1,i=i+"\n"+d}else y&&s>0&&(i="\n"+i,n+=1,t+=1);i.length>h&&(t1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},e.prototype.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.setStyle("ace_selecting"),this.setState("select"))},e.prototype.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)e=this.$clickSelection.end;else if(1==i)e=this.$clickSelection.start;else{var o=r(this.$clickSelection,n);n=o.cursor,e=o.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},e.prototype.extendSelectionBy=function(e){var t,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),o=n.selection[e](i.row,i.column);if(this.$clickSelection){var a=this.$clickSelection.comparePoint(o.start),s=this.$clickSelection.comparePoint(o.end);if(-1==a&&s<=0)t=this.$clickSelection.end,o.end.row==i.row&&o.end.column==i.column||(i=o.start);else if(1==s&&a>=0)t=this.$clickSelection.start,o.start.row==i.row&&o.start.column==i.column||(i=o.end);else if(-1==a&&1==s)i=o.end,t=o.start;else{var l=r(this.$clickSelection,i);i=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(i),n.renderer.scrollCursorIntoView()},e.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},e.prototype.focusWait=function(){var e,t,n,i,o=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,i=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))),r=Date.now();(o>0||r-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},e.prototype.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,i=n.session.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},e.prototype.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},e.prototype.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},e.prototype.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=e.domEvent.timeStamp,o=i-n.t,r=o?e.wheelX/o:n.vx,a=o?e.wheelY/o:n.vy;o<550&&(r=(r+n.vx)/2,a=(a+n.vy)/2);var s=Math.abs(r/a),l=!1;return s>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(l=!0),s<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(l=!0),l?n.allowed=i:i-n.allowed<550&&(Math.abs(r)<=1.5*Math.abs(n.vx)&&Math.abs(a)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=i):n.allowed=0),n.t=i,n.vx=r,n.vy=a,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},e}();function r(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}o.prototype.selectEnd=o.prototype.selectByLinesEnd,o.prototype.selectAllEnd=o.prototype.selectByLinesEnd,o.prototype.selectByWordsEnd=o.prototype.selectByLinesEnd,t.DefaultHandlers=o})),ace.define("ace/lib/scroll",["require","exports","module"],(function(e,t,n){t.preventParentScroll=function(e){e.stopPropagation();var t=e.currentTarget;t.scrollHeight>t.clientHeight||e.preventDefault()}})),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],(function(e,t,n){var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},a=e("./lib/dom");e("./lib/event");var s=e("./range").Range,l=e("./lib/scroll").preventParentScroll,c="ace_tooltip",u=function(){function e(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}return e.prototype.$init=function(){return this.$element=a.createElement("div"),this.$element.className=c,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},e.prototype.getElement=function(){return this.$element||this.$init()},e.prototype.setText=function(e){this.getElement().textContent=e},e.prototype.setHtml=function(e){this.getElement().innerHTML=e},e.prototype.setPosition=function(e,t){var n=this.getElement(),i=n.offsetParent&&n.offsetParent.getBoundingClientRect();n.style.left=e-(i?i.left:0)+"px",n.style.top=t-(i?i.top:0)+"px"},e.prototype.setClassName=function(e){a.addCssClass(this.getElement(),e)},e.prototype.setTheme=function(e){this.$element.className=c+" "+(e.isDark?"ace_dark ":"")+(e.cssClass||"")},e.prototype.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},e.prototype.hide=function(e){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=c,this.isOpen=!1)},e.prototype.getHeight=function(){return this.getElement().offsetHeight},e.prototype.getWidth=function(){return this.getElement().offsetWidth},e.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},e}(),d=new(function(){function e(){this.popups=[]}return e.prototype.addPopup=function(e){this.popups.push(e),this.updatePopups()},e.prototype.removePopup=function(e){var t=this.popups.indexOf(e);-1!==t&&(this.popups.splice(t,1),this.updatePopups())},e.prototype.updatePopups=function(){var e,t,n,i;this.popups.sort((function(e,t){return t.priority-e.priority}));var o=[];try{for(var a=r(this.popups),s=a.next();!s.done;s=a.next()){var l=s.value,c=!0;try{for(var u=(n=void 0,r(o)),d=u.next();!d.done;d=u.next()){var h=d.value;if(this.doPopupsOverlap(h,l)){c=!1;break}}}catch(p){n={error:p}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}c?o.push(l):l.hide()}}catch(m){e={error:m}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}},e.prototype.doPopupsOverlap=function(e,t){var n=e.getElement().getBoundingClientRect(),i=t.getElement().getBoundingClientRect();return n.lefti.left&&n.topi.top},e}());t.popupManager=d,t.Tooltip=u;var h=function(e){function t(t){void 0===t&&(t=document.body);var n=e.call(this,t)||this;n.timeout=void 0,n.lastT=0,n.idleTime=350,n.lastEvent=void 0,n.onMouseOut=n.onMouseOut.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.waitForHover=n.waitForHover.bind(n),n.hide=n.hide.bind(n);var i=n.getElement();return i.style.whiteSpace="pre-wrap",i.style.pointerEvents="auto",i.addEventListener("mouseout",n.onMouseOut),i.tabIndex=-1,i.addEventListener("blur",function(){i.contains(document.activeElement)||this.hide()}.bind(n)),i.addEventListener("wheel",l),n}return o(t,e),t.prototype.addToEditor=function(e){e.on("mousemove",this.onMouseMove),e.on("mousedown",this.hide),e.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},t.prototype.removeFromEditor=function(e){e.off("mousemove",this.onMouseMove),e.off("mousedown",this.hide),e.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},t.prototype.onMouseMove=function(e,t){this.lastEvent=e,this.lastT=Date.now();var n=t.$mouseHandler.isMousePressed;if(this.isOpen){var i=this.lastEvent&&this.lastEvent.getDocumentPosition();this.range&&this.range.contains(i.row,i.column)&&!n&&!this.isOutsideOfText(this.lastEvent)||this.hide()}this.timeout||n||(this.lastEvent=e,this.timeout=setTimeout(this.waitForHover,this.idleTime))},t.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var e=Date.now()-this.lastT;this.idleTime-e>10?this.timeout=setTimeout(this.waitForHover,this.idleTime-e):(this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor))},t.prototype.isOutsideOfText=function(e){var t=e.editor,n=e.getDocumentPosition(),i=t.session.getLine(n.row);if(n.column==i.length){var o=t.renderer.pixelToScreenCoordinates(e.clientX,e.clientY),r=t.session.documentToScreenPosition(n.row,n.column);if(r.column!=o.column||r.row!=o.row)return!0}return!1},t.prototype.setDataProvider=function(e){this.$gatherData=e},t.prototype.showForRange=function(e,t,n,i){if(!(i&&i!=this.lastEvent||this.isOpen&&document.activeElement==this.getElement())){var o=e.renderer;this.isOpen||(d.addPopup(this),this.$registerCloseEvents(),this.setTheme(o.theme)),this.isOpen=!0,this.addMarker(t,e.session),this.range=s.fromPoints(t.start,t.end);var r=o.textToScreenCoordinates(t.start.row,t.start.column),a=o.scroller.getBoundingClientRect();r.pageX=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},a=e("../lib/dom"),s=e("../lib/event"),l=e("../tooltip").Tooltip,c=e("../config").nls;t.GUTTER_TOOLTIP_LEFT_OFFSET=5,t.GUTTER_TOOLTIP_TOP_OFFSET=3,t.GutterHandler=function(e){var t,n,i=e.editor,o=i.renderer.$gutterLayer,r=new u(i,!0);function l(e){e&&"keydown"===e.type&&(e.ctrlKey||e.metaKey)||(!e||"mouseout"!==e.type||e.relatedTarget&&!r.getElement().contains(e.relatedTarget))&&(t&&(t=clearTimeout(t)),r.isOpen&&(r.hideTooltip(),i.off("mousewheel",l),i.off("changeSession",l),window.removeEventListener("keydown",l,!0)))}function c(e){r.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(i.isFocused()&&0==t.getButton()&&"foldWidgets"!=o.getRegion(t)){var n=t.getDocumentPosition().row,r=i.session.selection;if(t.getShiftKey())r.selectTo(n,0);else{if(2==t.domEvent.detail)return i.selectAll(),t.preventDefault();e.$clickSelection=i.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(s){var u=s.domEvent.target||s.domEvent.srcElement;if(a.hasCssClass(u,"ace_fold-widget")||a.hasCssClass(u,"ace_custom-widget"))return l();r.isOpen&&e.$tooltipFollowsMouse&&c(s),n=s,t||(t=setTimeout((function(){t=null,n&&!e.isMousePressed&&function(){var t=n.getDocumentPosition().row;if(t==i.session.getLength()){var a=i.renderer.pixelToScreenCoordinates(0,n.y).row,s=n.$pos;if(a>i.session.documentToScreenRow(s.row,s.column))return l()}if(r.showTooltip(t),r.isOpen)if(i.on("mousewheel",l),i.on("changeSession",l),window.addEventListener("keydown",l,!0),e.$tooltipFollowsMouse)c(n);else{var u=n.getGutterRow(),d=o.$lines.get(u);if(d){var h=d.element.querySelector(".ace_gutter_annotation").getBoundingClientRect(),p=r.getElement().style;p.left=h.right-5+"px",p.top=h.bottom-3+"px"}else c(n)}}()}),50))})),s.addListener(i.renderer.$gutter,"mouseout",(function(e){n=null,r.isOpen&&(t=setTimeout((function(){t=null,l(e)}),50))}),i)};var u=function(e){function t(n,i){void 0===i&&(i=!1);var o=e.call(this,n.container)||this;o.id="gt"+ ++t.$uid,o.editor=n,o.visibleTooltipRow;var r=o.getElement();return r.setAttribute("role","tooltip"),r.setAttribute("id",o.id),r.style.pointerEvents="auto",i&&(o.onMouseOut=o.onMouseOut.bind(o),r.addEventListener("mouseout",o.onMouseOut)),o}return o(t,e),t.prototype.onMouseOut=function(e){this.isOpen&&e.relatedTarget&&!this.getElement().contains(e.relatedTarget)&&(e&&e.currentTarget.contains(e.relatedTarget)||this.hideTooltip())},t.prototype.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,o=this.getWidth(),r=this.getHeight();(e+=15)+o>n&&(e-=e+o-n),(t+=15)+r>i&&(t-=20+r),l.prototype.setPosition.call(this,e,t)},Object.defineProperty(t,"annotationLabels",{get:function(){return{error:{singular:c("gutter-tooltip.aria-label.error.singular","error"),plural:c("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:c("gutter-tooltip.aria-label.security.singular","security finding"),plural:c("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:c("gutter-tooltip.aria-label.warning.singular","warning"),plural:c("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:c("gutter-tooltip.aria-label.info.singular","information message"),plural:c("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:c("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:c("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),t.prototype.showTooltip=function(e){var n,i,o=this.editor.renderer.$gutterLayer,r=o.$annotations[e];i=r?{displayText:Array.from(r.displayText),type:Array.from(r.type)}:{displayText:[],type:[]};var s=o.session.getFoldLine(e);if(s&&o.$showFoldedAnnotations){for(var l,c={error:[],security:[],warning:[],info:[],hint:[]},u={error:1,security:2,warning:3,info:4,hint:5},d=e+1;d<=s.end.row;d++)if(o.$annotations[d])for(var h=0;h2)return n.childNodes[2]}},t.prototype.$findCellByRow=function(e){return this.editor.renderer.$gutterLayer.$lines.cells.find((function(t){return t.row===e}))},t.prototype.hideTooltip=function(){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.hide(),null!=this.visibleTooltipRow){var e=this.$findLinkedAnnotationNode(this.visibleTooltipRow);e&&e.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this)}},t.annotationsToSummaryString=function(e){var n,i,o=[];try{for(var a=r(["error","security","warning","info","hint"]),s=a.next();!s.done;s=a.next()){var l=s.value;if(e[l].length){var c=1===e[l].length?t.annotationLabels[l].singular:t.annotationLabels[l].plural;o.push("".concat(e[l].length," ").concat(c))}}}catch(u){n={error:u}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o.join(", ")},t}(l);u.$uid=0,t.GutterTooltip=u})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){var i=e("../lib/event"),o=e("../lib/useragent"),r=function(){function e(e,t){this.speed,this.wheelX,this.wheelY,this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return e.prototype.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},e.prototype.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},e.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},e.prototype.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},e.prototype.getGutterRow=function(){var e=this.getDocumentPosition().row;return this.editor.session.documentToScreenRow(e,0)-this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0)},e.prototype.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},e.prototype.getButton=function(){return i.getButton(this.domEvent)},e.prototype.getShiftKey=function(){return this.domEvent.shiftKey},e.prototype.getAccelKey=function(){return o.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},e}();t.MouseEvent=r})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,n){var i=e("../lib/dom"),o=e("../lib/event"),r=e("../lib/useragent");function a(e){var t=e.editor,n=i.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent=" ",["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),t.on("mousedown",this.onMouseDown.bind(e));var a,l,c,u,d,h,p,m,f,g,y,v=t.container,b=0;function w(){var e=h;(function(e,n){var i=Date.now(),o=!n||e.row!=n.row,r=!n||e.column!=n.column;!g||o||r?(t.moveCursorToPosition(e),g=i,y={x:l,y:c}):s(y.x,y.y,l,c)>5?g=null:i-g>=200&&(t.renderer.scrollCursorIntoView(),g=null)})(h=t.renderer.screenToTextCoordinates(l,c),e),function(e,n){var i=Date.now(),o=t.renderer.layerConfig.lineHeight,r=t.renderer.layerConfig.characterWidth,a=t.renderer.scroller.getBoundingClientRect(),s={x:{left:l-a.left,right:a.right-l},y:{top:c-a.top,bottom:a.bottom-c}},u=Math.min(s.x.left,s.x.right),d=Math.min(s.y.top,s.y.bottom),h={row:e.row,column:e.column};u/r<=2&&(h.column+=s.x.left=200&&t.renderer.scrollCursorIntoView(h):f=i:f=null}(h,e)}function x(){d=t.selection.toOrientedRange(),a=t.session.addMarker(d,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(u),w(),u=setInterval(w,20),b=0,o.addListener(document,"mousemove",S)}function C(){clearInterval(u),t.session.removeMarker(a),a=null,t.selection.fromOrientedRange(d),t.isFocused()&&!m&&t.$resetCursorStyle(),d=null,h=null,b=0,f=null,g=null,o.removeListener(document,"mousemove",S)}this.onDragStart=function(e){if(this.cancelDrag||!v.draggable){var i=this;return setTimeout((function(){i.startSelect(),i.captureMouse(e)}),0),e.preventDefault()}d=t.getSelectionRange();var o=e.dataTransfer;o.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(n),o.setDragImage&&o.setDragImage(n,0,0),setTimeout((function(){t.container.removeChild(n)})),o.clearData(),o.setData("Text",t.session.getTextRange()),m=!0,this.setState("drag")},this.onDragEnd=function(e){if(v.draggable=!1,m=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;p||"move"!=n||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&k(e.dataTransfer))return l=e.clientX,c=e.clientY,a||x(),b++,e.dataTransfer.dropEffect=p=E(e),o.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&k(e.dataTransfer))return l=e.clientX,c=e.clientY,a||(x(),b++),null!==_&&(_=null),e.dataTransfer.dropEffect=p=E(e),o.preventDefault(e)},this.onDragLeave=function(e){if(--b<=0&&a)return C(),p=null,o.preventDefault(e)},this.onDrop=function(e){if(h){var n=e.dataTransfer;if(m)switch(p){case"move":d=d.contains(h.row,h.column)?{start:h,end:h}:t.moveText(d,h);break;case"copy":d=t.moveText(d,h,!0)}else{var i=n.getData("Text");d={start:h,end:t.session.insert(h,i)},t.focus(),p=null}return C(),o.preventDefault(e)}},o.addListener(v,"dragstart",this.onDragStart.bind(e),t),o.addListener(v,"dragend",this.onDragEnd.bind(e),t),o.addListener(v,"dragenter",this.onDragEnter.bind(e),t),o.addListener(v,"dragover",this.onDragOver.bind(e),t),o.addListener(v,"dragleave",this.onDragLeave.bind(e),t),o.addListener(v,"drop",this.onDrop.bind(e),t);var _=null;function S(){null==_&&(_=setTimeout((function(){null!=_&&a&&C()}),20))}function k(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function E(e){var t=["copy","copymove","all","uninitialized"],n=r.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(a){}var o="none";return n&&t.indexOf(i)>=0?o="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(i)>=0?o="move":t.indexOf(i)>=0&&(o="copy"),o}}function s(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=r.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;r.isIE&&"dragReady"==this.state&&s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop(),"dragWait"===this.state&&s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),i=e.getButton();if(1===(e.domEvent.detail||1)&&0===i&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=e.domEvent.target||e.domEvent.srcElement;"unselectable"in o&&(o.unselectable="on"),t.getDragDelay()?(r.isWebKit&&(this.cancelDrag=!0,t.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(a.prototype),t.DragdropHandler=a})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,n){var i=e("./mouse_event").MouseEvent,o=e("../lib/event"),r=e("../lib/dom");t.addTouchListeners=function(e,t){var n,a,s,l,c,u,d,h,p,m="scroll",f=0,g=0,y=0,v=0;function b(){if(t.getOption("enableMobileMenu")){p||(s=window.navigator&&window.navigator.clipboard,l=!1,c=function(e){return t.commands.canExecute(e,t)},u=function(e){var n,i,o=e.target.getAttribute("action");if("more"==o||!l)return l=!l,n=t.getCopyText(),i=t.session.getUndoManager().hasUndo(),void p.replaceChild(r.buildDom(l?["span",!n&&c("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],n&&c("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],n&&c("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],s&&c("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],i&&c("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],c("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],c("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),p.firstChild);"paste"==o?s.readText().then((function(e){t.execCommand(o,e)})):o&&("cut"!=o&&"copy"!=o||(s?s.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(o)),p.firstChild.style.display="none",l=!1,"openCommandPalette"!=o&&t.focus()},p=r.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){m="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),u(e)},onclick:u},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container));var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),i=t.renderer.textToScreenCoordinates(0,0).pageX,o=t.renderer.scrollLeft,a=t.container.getBoundingClientRect();p.style.top=n.pageY-a.top-3+"px",n.pageX-a.left1)return clearTimeout(c),c=null,s=-1,void(m="zoom");h=t.$mouseHandler.isMousePressed=!0;var r=t.renderer.layerConfig.lineHeight,u=t.renderer.layerConfig.lineHeight,p=e.timeStamp;l=p;var b=o[0],w=b.clientX,C=b.clientY;Math.abs(n-w)+Math.abs(a-C)>r&&(s=-1),n=e.clientX=w,a=e.clientY=C,y=v=0;var _=new i(e,t);if(d=_.getDocumentPosition(),p-s<500&&1==o.length&&!f)g++,e.preventDefault(),e.button=0,function(){c=null,clearTimeout(c),t.selection.moveToPosition(d);var e=g>=2?t.selection.getLineRange(d.row):t.session.getBracketRange(d);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),m="wait"}();else{g=0;var S=t.selection.cursor,k=t.selection.isEmpty()?S:t.selection.anchor,E=t.renderer.$cursorLayer.getPixelPosition(S,!0),$=t.renderer.$cursorLayer.getPixelPosition(k,!0),M=t.renderer.scroller.getBoundingClientRect(),R=t.renderer.layerConfig.offset,A=t.renderer.scrollLeft,O=function(e,t){return(e/=u)*e+(t=t/r-.75)*t};if(e.clientXT?"cursor":"anchor"),m=T<3.5?"anchor":j<3.5?"cursor":"scroll",c=setTimeout(x,450)}s=p}),t),o.addListener(e,"touchend",(function(e){h=t.$mouseHandler.isMousePressed=!1,u&&clearInterval(u),"zoom"==m?(m="",f=0):c?(t.selection.moveToPosition(d),f=0,b()):"scroll"==m?(f+=60,u=setInterval((function(){f--<=0&&(clearInterval(u),u=null),Math.abs(y)<.01&&(y=0),Math.abs(v)<.01&&(v=0),f<20&&(y*=.9),f<20&&(v*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*y,10*v),e==t.session.getScrollTop()&&(f=0)}),10),w()):b(),clearTimeout(c),c=null}),t),o.addListener(e,"touchmove",(function(e){c&&(clearTimeout(c),c=null);var o=e.touches;if(!(o.length>1||"zoom"==m)){var r=o[0],s=n-r.clientX,u=a-r.clientY;if("wait"==m){if(!(s*s+u*u>4))return e.preventDefault();m="cursor"}n=r.clientX,a=r.clientY,e.clientX=r.clientX,e.clientY=r.clientY;var d=e.timeStamp,h=d-l;if(l=d,"scroll"==m){var p=new i(e,t);p.speed=1,p.wheelX=s,p.wheelY=u,10*Math.abs(s)=e){for(r=d+1;r=e;)r++;for(s=d,l=r-1;s=t.length||2!=(l=n[o-1])&&3!=l||2!=(c=t[o+1])&&3!=c?4:(r&&(c=3),c==l?c:4);case 10:return 2==(l=o>0?n[o-1]:5)&&o+10&&2==n[o-1])return 2;if(r)return 4;for(p=o+1,h=t.length;p=1425&&f<=2303||64286==f;if(l=t[p],g&&(1==l||7==l))return 1}return o<1||5==(l=t[o-1])?4:n[o-1];case 5:return r=!1,a=!0,i;case 6:return s=!0,4;case 13:case 14:case 16:case 17:case 15:r=!1;case d:return 4}}function g(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?0:h[t]:5==n?/[\u0591-\u05f4]/.test(e)?1:0:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?12:/[\u0660-\u0669\u066b-\u066c]/.test(e)?3:1642==t?u:/[\u06f0-\u06f9]/.test(e)?2:7:32==n&&t<=8287?p[255&t]:254==n&&t>=65136?7:4}t.L=0,t.R=1,t.EN=2,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="·",t.doBidiReorder=function(e,n,u){if(e.length<2)return{};var h=e.split(""),p=new Array(h.length),y=new Array(h.length),v=[];i=u?1:0,function(e,t,n,u){var d=i?c:l,h=null,p=null,m=null,y=0,v=null,b=-1,w=null,x=null,C=[];if(!u)for(w=0,u=[];w0)if(16==v){for(w=b;w-1){for(w=b;w=0&&8==u[_];_--)t[_]=i}}(h,v,h.length,n);for(var b=0;b7&&n[b]<13||4===n[b]||n[b]===d)?v[b]=t.ON_R:b>0&&"ل"===h[b-1]&&/\u0622|\u0623|\u0625|\u0627/.test(h[b])&&(v[b-1]=v[b]=t.R_H,b++);for(h[h.length-1]===t.DOT&&(v[h.length-1]=t.B),"‫"===h[0]&&(v[0]=t.RLE),b=0;b=0&&(e=this.session.$docRowCache[n])}return e},e.prototype.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,i=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===i;)i=n,e++;else e=this.currentRow;return e},e.prototype.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var r=this.session.$wrapData[e];r&&(void 0===t&&(t=this.getSplitIndex()),t>0&&r.length?(this.wrapIndent=r.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,o=i.getVisualFromLogicalIdx(n,this.bidiMap),r=this.bidiMap.bidiLevels,a=0;!this.session.getOverwrite()&&e<=t&&r[o]%2!=0&&o++;for(var s=0;st&&r[o]%2==0&&(a+=this.charWidths[r[o]]),this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(a+=this.rtlLineOffset),a},e.prototype.getSelections=function(e,t){var n,i=this.bidiMap,o=i.bidiLevels,r=[],a=0,s=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,u=!1,d=0;this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var h,p=0;p=s&&hn+r/2;){if(n+=r,i===o.length-1){r=0;break}r=this.charWidths[o[++i]]}return i>0&&o[i-1]%2!=0&&o[i]%2==0?(e0&&o[i-1]%2==0&&o[i]%2!=0?t=1+(e>n?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===o.length-1&&0===r&&o[i-1]%2==0||!this.isRtlDir&&0===i&&o[i]%2!=0?t=1+this.bidiMap.logicalFromVisual[i]:(i>0&&o[i-1]%2!=0&&0!==r&&i--,t=this.bidiMap.logicalFromVisual[i]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent},e}();t.BidiHandler=a})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,n){var i=e("./lib/oop"),o=e("./lib/lang"),r=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=function(){function e(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")}))}return e.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},e.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},e.prototype.getCursor=function(){return this.lead.getPosition()},e.prototype.setAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},e.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},e.prototype.getSelectionLead=function(){return this.lead.getPosition()},e.prototype.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},e.prototype.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?a.fromPoints(t,t):this.isBackwards()?a.fromPoints(t,e):a.fromPoints(e,t)},e.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},e.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},e.prototype.setRange=function(e,t){var n=t?e.end:e.start,i=t?e.start:e.end;this.$setSelection(n.row,n.column,i.row,i.column)},e.prototype.$setSelection=function(e,t,n,i){if(!this.$silent){var o=this.$isEmpty,r=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,i),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||o!=this.$isEmpty||r)&&this._emit("changeSelection")}},e.prototype.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},e.prototype.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},e.prototype.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},e.prototype.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},e.prototype.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},e.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},e.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},e.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},e.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},e.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},e.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},e.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},e.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},e.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},e.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},e.prototype.getWordRange=function(e,t){if(void 0===t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},e.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},e.prototype.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},e.prototype.getLineRange=function(e,t){var n,i="number"==typeof e?e:this.lead.row,o=this.session.getFoldLine(i);return o?(i=o.start.row,n=o.end.row):n=i,!0===t?new a(i,0,n,this.session.getLine(n).length):new a(i,0,n+1,0)},e.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},e.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},e.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},e.prototype.wouldMoveIntoSoftTab=function(e,t,n){var i=e.column,o=e.column+t;return n<0&&(i=e.column-t,o=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(i,o).split(" ").length-1==t},e.prototype.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},e.prototype.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=i)}}this.moveCursorTo(t.row,t.column)},e.prototype.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},e.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},e.prototype.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(e,t,1);if(o)this.moveCursorTo(o.end.row,o.end.column);else{if(this.session.nonTokenRe.exec(i)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(r)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},e.prototype.$shortWordEndIndex=function(e){var t,n=0,i=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&i.test(t);)n++;if(n<1)for(o.lastIndex=0;(t=e[n])&&!o.test(t);)if(o.lastIndex=0,n++,i.test(t)){if(n>2){n--;break}for(;(t=e[n])&&i.test(t);)n++;if(n>2)break}}return o.lastIndex=0,n},e.prototype.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t),o=this.session.getFoldAt(e,t,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(t==n.length){var r=this.doc.getLength();do{e++,i=this.doc.getLine(e)}while(e0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var r=o.stringReverse(i),a=this.$shortWordEndIndex(r);return this.moveCursorTo(t,n-a)},e.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},e.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},e.prototype.moveCursorBy=function(e,t){var n,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var o=this.session.lineWidgets[this.lead.row];e<0?e-=o.rowsAbove||0:e>0&&(e+=o.rowCount-(o.rowsAbove||0))}var r=this.session.screenToDocumentPosition(i.row+e,i.column,n);0!==e&&0===t&&r.row===this.lead.row&&(r.column,this.lead.column),this.moveCursorTo(r.row,r.column+t,0===t)},e.prototype.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},e.prototype.moveCursorTo=function(e,t,n){var i=this.session.getFoldAt(e,t,1);i&&(e=i.start.row,t=i.start.column),this.$keepDesiredColumnOnChange=!0;var o=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(o.charAt(t))&&o.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},e.prototype.moveCursorToScreen=function(e,t,n){var i=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(i.row,i.column,n)},e.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},e.prototype.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},e.prototype.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},e.prototype.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return a.fromPoints(t,n)}catch(i){return a.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},e.prototype.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},e.prototype.fromJSON=function(e){if(null==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=a.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},e.prototype.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0},e}();s.prototype.setSelectionAnchor=s.prototype.setAnchor,s.prototype.getSelectionAnchor=s.prototype.getAnchor,s.prototype.setSelectionRange=s.prototype.setRange,i.implement(s.prototype,r),t.Selection=s})),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],(function(e,t,n){var i=e("./lib/report_error").reportError,o=2e3,r=function(){function e(e){for(var t in this.splitRegex,this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],i=[],o=0,r=this.matchMappings[t]={defaultToken:"text"},a="g",s=[],l=0;l1?this.$applyToken:c.token),d>1&&(/\\\d/.test(c.regex)?u=c.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+o+1)})):(d=1,u=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||s.push(c)),r[o]=l,o+=d,i.push(u),c.onMatch||(c.onMatch=null)}}i.length||(r[0]=0,i.push("$")),s.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,a)}),this),this.regExps[t]=new RegExp("("+i.join(")|(")+")|($)",a)}}return e.prototype.$setMaxTokenCount=function(e){o=0|e},e.prototype.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var i=[],o=0,r=n.length;ou){var y=e.substring(u,g-f.length);h.type==p?h.value+=y:(h.type&&c.push(h),h={type:p,value:y})}for(var v=0;vo){for(d>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});u1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:c,state:n.length?n:i}},e}();r.prototype.reportError=i,t.Tokenizer=r})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],(function(e,t,n){var i,o=e("../lib/deep_copy").deepCopy;(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var i=e[n],o=0;o=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentTokenRow=function(){return this.$row},e.prototype.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},e.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},e.prototype.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new i(this.$row,t,this.$row,t+e.value.length)},e}();t.TokenIterator=o})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,n){var i,o,r=e("../../lib/oop"),a=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,l=e("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],u=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],d={},h={'"':'"',"'":"'"},p=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,d.rangeCount!=e.multiSelect.rangeCount&&(d={rangeCount:e.multiSelect.rangeCount})),d[t])return i=d[t];i=d[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},m=function(e,t,n,i){var o=e.end.row-e.start.row;return{text:n+t+i,selection:[0,e.start.column+1,o,e.end.column+(o?0:1)]}};(o=function(e){e=e||{},this.add("braces","insertion",(function(t,n,r,a,s){var c=r.getCursorPosition(),u=a.doc.getLine(c.row);if("{"==s){p(r);var d=r.getSelectionRange(),h=a.doc.getTextRange(d),f=a.getTokenAt(c.row,c.column);if(""!==h&&"{"!==h&&r.getWrapBehavioursEnabled())return m(d,h,"{","}");if(f&&/(?:string)\.quasi|\.xml/.test(f.type)){if([/tag\-(?:open|name)/,/attribute\-name/].some((function(e){return e.test(f.type)}))||/(string)\.quasi/.test(f.type)&&"$"!==f.value[c.column-f.start-1])return;return o.recordAutoInsert(r,a,"}"),{text:"{}",selection:[1,1]}}if(o.isSaneInsertion(r,a))return/[\]\}\)]/.test(u[c.column])||r.inMultiSelectMode||e.braces?(o.recordAutoInsert(r,a,"}"),{text:"{}",selection:[1,1]}):(o.recordMaybeInsert(r,a,"{"),{text:"{",selection:[1,1]})}else if("}"==s){if(p(r),"}"==u.substring(c.column,c.column+1)&&null!==a.$findOpeningBracket("}",{column:c.column+1,row:c.row})&&o.isAutoInsertedClosing(c,u,s))return o.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==s||"\r\n"==s){p(r);var g="";if(o.isMaybeInsertedClosing(c,u)&&(g=l.stringRepeat("}",i.maybeInsertedBrackets),o.clearMaybeInsertedClosing()),"}"===u.substring(c.column,c.column+1)){var y=a.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!y)return null;var v=this.$getIndent(a.getLine(y.row))}else{if(!g)return void o.clearMaybeInsertedClosing();v=this.$getIndent(u)}var b=v+a.getTabString();return{text:"\n"+b+"\n"+v+g,selection:[1,b.length,1,b.length]}}o.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&"{"==a){if(p(n),"}"==o.doc.getLine(r.start.row).substring(r.end.column,r.end.column+1))return r.end.column++,r;i.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(e,t,n,i,r){if("("==r){p(n);var a=n.getSelectionRange(),s=i.doc.getTextRange(a);if(""!==s&&n.getWrapBehavioursEnabled())return m(a,s,"(",")");if(o.isSaneInsertion(n,i))return o.recordAutoInsert(n,i,")"),{text:"()",selection:[1,1]}}else if(")"==r){p(n);var l=n.getCursorPosition(),c=i.doc.getLine(l.row);if(")"==c.substring(l.column,l.column+1)&&null!==i.$findOpeningBracket(")",{column:l.column+1,row:l.row})&&o.isAutoInsertedClosing(l,c,r))return o.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,i,o){var r=i.doc.getTextRange(o);if(!o.isMultiLine()&&"("==r&&(p(n),")"==i.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("brackets","insertion",(function(e,t,n,i,r){if("["==r){p(n);var a=n.getSelectionRange(),s=i.doc.getTextRange(a);if(""!==s&&n.getWrapBehavioursEnabled())return m(a,s,"[","]");if(o.isSaneInsertion(n,i))return o.recordAutoInsert(n,i,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){p(n);var l=n.getCursorPosition(),c=i.doc.getLine(l.row);if("]"==c.substring(l.column,l.column+1)&&null!==i.$findOpeningBracket("]",{column:l.column+1,row:l.row})&&o.isAutoInsertedClosing(l,c,r))return o.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,i,o){var r=i.doc.getTextRange(o);if(!o.isMultiLine()&&"["==r&&(p(n),"]"==i.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("string_dquotes","insertion",(function(e,t,n,i,o){var r=i.$mode.$quotes||h;if(1==o.length&&r[o]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(o))return;p(n);var a=o,s=n.getSelectionRange(),l=i.doc.getTextRange(s);if(!(""===l||1==l.length&&r[l])&&n.getWrapBehavioursEnabled())return m(s,l,a,a);if(!l){var c=n.getCursorPosition(),u=i.doc.getLine(c.row),d=u.substring(c.column-1,c.column),f=u.substring(c.column,c.column+1),g=i.getTokenAt(c.row,c.column),y=i.getTokenAt(c.row,c.column+1);if("\\"==d&&g&&/escape/.test(g.type))return null;var v,b=g&&/string|escape/.test(g.type),w=!y||/string|escape/.test(y.type);if(f==a)(v=b!==w)&&/string\.end/.test(y.type)&&(v=!1);else{if(b&&!w)return null;if(b&&w)return null;var x=i.$mode.tokenRe;x.lastIndex=0;var C=x.test(d);x.lastIndex=0;var _=x.test(f),S=i.$mode.$pairQuotesAfter;if(!(S&&S[a]&&S[a].test(d))&&C||_)return null;if(f&&!/[\s;,.})\]\\]/.test(f))return null;var k=u[c.column-2];if(d==a&&(k==a||x.test(k)))return null;v=!0}return{text:v?a+a:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,i,o){var r=i.$mode.$quotes||h,a=i.doc.getTextRange(o);if(!o.isMultiLine()&&r.hasOwnProperty(a)&&(p(n),i.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)==a))return o.end.column++,o})),!1!==e.closeDocComment&&this.add("doc comment end","insertion",(function(e,t,n,i,o){if("doc-start"===e&&("\n"===o||"\r\n"===o)&&n.selection.isEmpty()){var r=n.getCursorPosition();if(0===r.column)return;for(var a=i.doc.getLine(r.row),s=i.doc.getLine(r.row+1),l=i.getTokens(r.row),c=0,u=0;u=r.column){if(c===r.column){if(!/\.doc/.test(d.type))return;if(/\*\//.test(d.value)){var h=l[u+1];if(!h||!/\.doc/.test(h.type))return}}var p=r.column-(c-d.value.length),m=d.value.indexOf("*/"),f=d.value.indexOf("/**",m>-1?m+2:0);if(-1!==f&&p>f&&p=m&&p<=f||!/\.doc/.test(d.type))return;break}}var g=this.$getIndent(a);if(/\s*\*/.test(s))return/^\s*\*/.test(a)?{text:o+g+"* ",selection:[1,2+g.length,1,2+g.length]}:{text:o+g+" * ",selection:[1,3+g.length,1,3+g.length]};if(/\/\*\*/.test(a.substring(0,r.column)))return{text:o+g+" * "+o+" "+g+"*/",selection:[1,4+g.length,1,4+g.length]}}}))}).isSaneInsertion=function(e,t){var n=e.getCursorPosition(),i=new s(t,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",c)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var o=new s(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",c))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",u)},o.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},o.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),r=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,r,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=o.row,i.autoInsertedLineEnd=n+r.substr(o.column),i.autoInsertedBrackets++},o.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),r=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,r)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=o.row,i.maybeInsertedLineStart=r.substr(0,o.column)+n,i.maybeInsertedLineEnd=r.substr(o.column),i.maybeInsertedBrackets++},o.isAutoInsertedClosing=function(e,t,n){return i.autoInsertedBrackets>0&&e.row===i.autoInsertedRow&&n===i.autoInsertedLineEnd[0]&&t.substr(e.column)===i.autoInsertedLineEnd},o.isMaybeInsertedClosing=function(e,t){return i.maybeInsertedBrackets>0&&e.row===i.maybeInsertedRow&&t.substr(e.column)===i.maybeInsertedLineEnd&&t.substr(0,e.column)==i.maybeInsertedLineStart},o.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},o.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},r.inherits(o,a),t.CstyleBehaviour=o})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){for(var i=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],o=0,r=[],a=0;a2?i%l!=l-1:i%l==0})}else{if(!this.blockComment)return!1;var p=this.blockComment.start,m=this.blockComment.end,f=new RegExp("^(\\s*)(?:"+c.escapeRegExp(p)+")"),g=new RegExp("(?:"+c.escapeRegExp(m)+")\\s*$"),y=function(e,t){b(e,t)||r&&!/\S/.test(e)||(o.insertInLine({row:t,column:e.length},m),o.insertInLine({row:t,column:s},p))},v=function(e,t){var n;(n=e.match(g))&&o.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(f))&&o.removeInLine(t,n[1].length,n[0].length)},b=function(e,n){if(f.test(e))return!0;for(var i=t.getTokens(n),o=0;oe.length&&(x=e.length)})),s==1/0&&(s=x,r=!1,a=!1),u&&s%l!=0&&(s=Math.floor(s/l)*l),w(a?v:y)},this.toggleBlockComment=function(e,t,n,i){var o=this.blockComment;if(o){!o.start&&o[0]&&(o=o[0]);var r=(f=new u(t,i.row,i.column)).getCurrentToken();t.selection;var a,s,l=t.selection.toOrientedRange();if(r&&/comment/.test(r.type)){for(var c,h;r&&/comment/.test(r.type);){if(-1!=(g=r.value.indexOf(o.start))){var p=f.getCurrentTokenRow(),m=f.getCurrentTokenColumn()+g;c=new d(p,m,p,m+o.start.length);break}r=f.stepBackward()}var f;for(r=(f=new u(t,i.row,i.column)).getCurrentToken();r&&/comment/.test(r.type);){var g;if(-1!=(g=r.value.indexOf(o.end))){p=f.getCurrentTokenRow(),m=f.getCurrentTokenColumn()+g,h=new d(p,m,p,m+o.end.length);break}r=f.stepForward()}h&&t.remove(h),c&&(t.remove(c),a=c.start.row,s=-o.start.length)}else s=o.start.length,a=n.start.row,t.insert(n.end,o.end),t.insert(n.start,o.start);l.start.row==a&&(l.start.column+=s),l.end.row==a&&(l.end.column+=s),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],i=n.prototype.$id,r=o.$modes[i];r||(o.$modes[i]=r=new n),o.$modes[t]||(o.$modes[t]=r),this.$embeds.push(t),this.$modes[t]=r}var a=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],s=function(e){var t,n,i;i=(t=l)[n=a[e]],t[a[e]]=function(){return this.$delegator(n,arguments,i)}},l=this;for(t=0;tt[n].column&&n++,r.unshift(n,0),t.splice.apply(t,r),this.$updateRows()}}},e.prototype.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget})),t&&(this.session.lineWidgets=null)}},e.prototype.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},e.prototype.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=i.createElement("div"),e.el.innerHTML=e.html),e.text&&!e.el&&(e.el=i.createElement("div"),e.el.textContent=e.text),e.el&&(i.addCssClass(e.el,"ace_lineWidgetContainer"),e.className&&i.addCssClass(e.el,e.className),e.el.style.position="absolute",e.el.style.zIndex="5",t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex="3"),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);if(e.$fold=n,n){var o=this.session.lineWidgets;e.row!=n.end.row||o[n.start.row]?e.hidden=!0:o[n.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},e.prototype.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(n){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},e.prototype.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],i=[];n;)i.push(n),n=n.$oldWidget;return i},e.prototype.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},e.prototype.measureWidgets=function(e,t){var n=this.session._changedWidgets,i=t.layerConfig;if(n&&n.length){for(var o=1/0,r=0;r0&&!i[o];)o--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var a=o;a<=r;a++){var s=i[a];if(s&&s.el)if(s.hidden)s.el.style.top=-100-(s.pixelHeight||0)+"px";else{s._inDocument||(s._inDocument=!0,t.container.appendChild(s.el));var l=t.$cursorLayer.getPixelPosition({row:a,column:0},!0).top;s.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(s.row)),s.el.style.top=l-n.offset+"px";var c=s.coverGutter?0:t.gutterWidth;s.fixedWidth||(c-=t.scrollLeft),s.el.style.left=c+"px",s.fullWidth&&s.screenWidth&&(s.el.style.minWidth=n.width+2*n.padding+"px"),s.fixedWidth?s.el.style.right=t.scrollBar.getWidth()+"px":s.el.style.right=""}}}},e}();t.LineWidgets=o})),ace.define("ace/apply_delta",["require","exports","module"],(function(e,t,n){t.applyDelta=function(e,t,n){var i=t.start.row,o=t.start.column,r=e[i]||"";switch(t.action){case"insert":if(1===t.lines.length)e[i]=r.substring(0,o)+t.lines[0]+r.substring(o);else{var a=[i,1].concat(t.lines);e.splice.apply(e,a),e[i]=r.substring(0,o)+e[i],e[i+t.lines.length-1]+=r.substring(o)}break;case"remove":var s=t.end.column,l=t.end.row;i===l?e[i]=r.substring(0,o)+r.substring(s):e.splice(i,l-i+1,r.substring(0,o)+e[l].substring(s))}}})),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){var i=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,r=function(){function e(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),"number"!=typeof t?this.setPosition(t.row,t.column):this.setPosition(t,n)}return e.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},e.prototype.getDocument=function(){return this.document},e.prototype.onChange=function(e){if(!(e.start.row==e.end.row&&e.start.row!=this.row||e.start.row>this.row)){var t=function(e,t,n){var i="insert"==e.action,o=(i?1:-1)*(e.end.row-e.start.row),r=(i?1:-1)*(e.end.column-e.start.column),s=e.start,l=i?s:e.end;return a(t,s,n)?{row:t.row,column:t.column}:a(l,t,!n)?{row:t.row+o,column:t.column+(t.row==l.row?r:0)}:{row:s.row,column:s.column}}(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0)}},e.prototype.setPosition=function(e,t,n){var i;if(i=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=i.row||this.column!=i.column){var o={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:o,value:i})}},e.prototype.detach=function(){this.document.off("change",this.$onChange)},e.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},e.prototype.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n},e}();function a(e,t,n){var i=n?e.column<=t.column:e.column=n&&(e=n-1,t=void 0);var i=this.getLine(e);return null==t&&(t=i.length),{row:e,column:t=Math.min(Math.max(t,0),i.length)}},e.prototype.clonePos=function(e){return{row:e.row,column:e.column}},e.prototype.pos=function(e,t){return{row:e,column:t}},e.prototype.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},e.prototype.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))0,i=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},e.prototype.replace=function(e,t){return e instanceof a||(e=a.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},e.prototype.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},e.prototype.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!a.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(o(this.$lines,e,t),this._signal("change",e)))},e.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==i&&(i=t),r<=i&&n.fireUpdateEvent(r,i)}}}return e.prototype.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},e.prototype.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},e.prototype.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},e.prototype.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},e.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},e.prototype.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},e.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},e.prototype.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},e.prototype.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},e.prototype.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],i=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=i.state+""?(this.states[e]=i.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=i.tokens},e.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},e}();i.implement(r.prototype,o),t.BackgroundTokenizer=r})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],(function(e,t,n){var i=e("./lib/lang"),o=e("./range").Range,r=function(){function e(e,t,n){void 0===n&&(n="text"),this.setRegexp(e),this.clazz=t,this.type=n,this.docLen=0}return e.prototype.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},e.prototype.update=function(e,t,n,r){if(this.regExp){for(var a=r.firstRow,s=r.lastRow,l={},c=n.$editor&&n.$editor.$search,u=c&&c.$isMultilineSearch(n.$editor.getLastSearchOptions()),d=a;d<=s;d++){var h=this.cache[d];if(null==h||n.getValue().length!=this.docLen){if(u){h=[];var p=c.$multiLineForward(n,this.regExp,d,s);if(p){var m=p.endRow<=s?p.endRow-1:s;m>d&&(d=m),h.push(new o(p.startRow,p.startCol,p.endRow,p.endCol))}h.length>this.MAX_RANGES&&(h=h.slice(0,this.MAX_RANGES))}else(h=i.getMatchOffsets(n.getLine(d),this.regExp)).length>this.MAX_RANGES&&(h=h.slice(0,this.MAX_RANGES)),h=h.map((function(e){return new o(d,e.offset,d,e.offset+e.length)}));this.cache[d]=h.length?h:""}if(0!==h.length)for(var f=h.length;f--;){var g=h[f].toScreenRange(n),y=g.toString();l[y]||(l[y]=!0,t.drawSingleLineMarker(e,g,this.clazz,r))}}this.docLen=n.getValue().length}},e}();r.prototype.MAX_RANGES=500,t.SearchHighlight=r})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,n){var i=function(){function e(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return e.prototype.addSession=function(e){this.$session=e},e.prototype.add=function(e,t,n){if(!this.$fromUndo&&e!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===t||!this.lastDeltas){this.lastDeltas=[];var i=this.$undoStack.length;i>this.$undoDepth-1&&this.$undoStack.splice(0,i-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev}"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e)}},e.prototype.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},e.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},e.prototype.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,i=n.length;i--;){var o=n[i][0];if(o.id<=e)break;o.id0},e.prototype.canRedo=function(){return this.$redoStack.length>0},e.prototype.bookmark=function(e){null==e&&(e=this.$rev),this.mark=e},e.prototype.isAtBookmark=function(){return this.$rev===this.mark},e.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},e.prototype.fromJSON=function(e){this.reset(),this.$undoStack=e.$undoStack,this.$redoStack=e.$redoStack},e.prototype.$prettyPrint=function(e){return e?s(e):s(this.$undoStack)+"\n---\n"+s(this.$redoStack)},e}();i.prototype.hasUndo=i.prototype.canUndo,i.prototype.hasRedo=i.prototype.canRedo,i.prototype.isClean=i.prototype.isAtBookmark,i.prototype.markClean=i.prototype.bookmark;var o=e("./range").Range,r=o.comparePoints;function a(e){return{row:e.row,column:e.column}}function s(e){if(e=e||this,Array.isArray(e))return e.map(s).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(l).join("\n"):l(e.value)),e.start&&(t+=l(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function l(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function c(e,t){var n="insert"==e.action,i="insert"==t.action;if(n&&i)if(r(t.start,e.end)>=0)h(t,e,-1);else{if(!(r(t.start,e.start)<=0))return null;h(e,t,1)}else if(n&&!i)if(r(t.start,e.end)>=0)h(t,e,-1);else{if(!(r(t.end,e.start)<=0))return null;h(e,t,-1)}else if(!n&&i)if(r(t.start,e.start)>=0)h(t,e,1);else{if(!(r(t.start,e.start)<=0))return null;h(e,t,1)}else if(!n&&!i)if(r(t.start,e.start)>=0)h(t,e,1);else{if(!(r(t.end,e.start)<=0))return null;h(e,t,-1)}return[t,e]}function u(e,t){for(var n=e.length;n--;)for(var i=0;i=0?h(e,t,-1):(r(e.start,t.start)<=0||h(e,o.fromPoints(t.start,e.start),-1),h(t,e,1));else if(!n&&i)r(t.start,e.end)>=0?h(t,e,-1):(r(t.start,e.start)<=0||h(t,o.fromPoints(e.start,t.start),-1),h(e,t,1));else if(!n&&!i)if(r(t.start,e.end)>=0)h(t,e,-1);else{var a,s;if(!(r(t.end,e.start)<=0))return r(e.start,t.start)<0&&(a=e,e=m(e,t.start)),r(e.end,t.end)>0&&(s=m(e,t.end)),p(t.end,e.start,e.end,-1),s&&!a&&(e.lines=s.lines,e.start=s.start,e.end=s.end,s=e),[t,a,s].filter(Boolean);h(e,t,-1)}return[t,e]}function h(e,t,n){p(e.start,t.start,t.end,n),p(e.end,t.start,t.end,n)}function p(e,t,n,i){e.row==(1==i?t:n).row&&(e.column+=i*(n.column-t.column)),e.row+=i*(n.row-t.row)}function m(e,t){var n=e.lines,i=e.end;e.end=a(t);var o=e.end.row-e.start.row,r=n.splice(o,n.length),s=o?t.column:t.column-e.start.column;return n.push(r[0].substring(0,s)),r[0]=r[0].substr(s),{start:a(t),end:i,lines:r,action:e.action}}function f(e,t){t=function(e){return{start:a(e.start),end:a(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var n=e.length;n--;){for(var i=e[n],o=0;othis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},e.prototype.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},e.prototype.walk=function(e,t,n){var i,o,r=0,a=this.folds,s=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l0)){var l=i(e,a.start);return 0===s?t&&0!==l?-r-2:r:l>0||0===l&&!t?r:-r-1}}return-r-1},e.prototype.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var i=this.pointIndex(e.end,t,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,e)},e.prototype.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},e.prototype.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},e.prototype.merge=function(){for(var e,t=[],n=this.ranges,o=(n=n.sort((function(e,t){return i(e.start,t.start)})))[0],r=1;r=0},e.prototype.containsPoint=function(e){return this.pointIndex(e)>=0},e.prototype.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},e.prototype.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row=i);a++);if("insert"==e.action){for(var l=o-i,c=-t.column+n.column;ai);a++)if(u.start.row==i&&u.start.column>=t.column&&(u.start.column==t.column&&this.$bias<=0||(u.start.column+=c,u.start.row+=l)),u.end.row==i&&u.end.column>=t.column){if(u.end.column==t.column&&this.$bias<0)continue;u.end.column==t.column&&c>0&&au.start.column&&u.end.column==r[a+1].start.column&&(u.end.column-=c),u.end.column+=c,u.end.row+=l}}else for(l=i-o,c=t.column-n.column;ao);a++)u.end.rowt.column)&&(u.end.column=t.column,u.end.row=t.row):(u.end.column+=c,u.end.row+=l):u.end.row>o&&(u.end.row+=l),u.start.rowt.column)&&(u.start.column=t.column,u.start.row=t.row):(u.start.column+=c,u.start.row+=l):u.start.row>o&&(u.start.row+=l);if(0!=l&&a=e)return o;if(o.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0);i=e)return o}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,i=t-e+1,o=0;o=t){s=e?i-=t-s:i=0);break}a>=e&&(i-=s>=e?a-s:a-e+1)}return i},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var n,i=this.$foldData,a=!1;e instanceof r?n=e:(n=new r(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var s=n.start.row,l=n.start.column,c=n.end.row,u=n.end.column,d=this.getFoldAt(s,l,1),h=this.getFoldAt(c,u,-1);if(d&&h==d)return d.addSubFold(n);d&&!d.range.isStart(s,l)&&this.removeFold(d),h&&!h.range.isEnd(c,u)&&this.removeFold(h);var p=this.getFoldsInRange(n.range);p.length>0&&(this.removeFolds(p),n.collapseChildren||p.forEach((function(e){n.addSubFold(e)})));for(var m=0;m0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var n,o;if(null==e)n=new i(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)n=new i(e,0,e,this.getLine(e).length);else if("row"in e)n=i.fromPoints(e,e);else{if(Array.isArray(e))return o=[],e.forEach((function(e){o=o.concat(this.unfold(e))}),this),o;n=e}for(var r=o=this.getFoldsInRangeList(n);1==o.length&&i.comparePoints(o[0].start,n.start)<0&&i.comparePoints(o[0].end,n.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(n);if(0!=t?this.removeFolds(o):this.expandFolds(o),r.length)return r},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,i,o){null==i&&(i=e.start.row),null==o&&(o=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var r=this.doc,a="";return e.walk((function(e,t,n,s){if(!(td)break}while(r&&l.test(r.type));r=o.stepBackward()}else r=o.getCurrentToken();if(c.end.row=o.getCurrentTokenRow(),c.end.column=o.getCurrentTokenColumn(),c.start.row==c.end.row&&c.start.column>c.end.column)return;return c}},this.foldAll=function(e,t,n,i){null==n&&(n=1e5);var o=this.foldWidgets;if(o){t=t||this.getLength();for(var r=e=e||0;r=e&&(r=a.end.row,a.collapseChildren=n,this.addFold("...",a))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var n=e.getTokens(t),i=0;i=0;){var r=n[o];if(null==r&&(r=n[o]=this.getFoldWidget(o)),"start"==r){var a=this.getFoldWidgetRange(o);if(i||(i=a),a&&a.end.row>=e)break}o--}return{range:-1!==o&&a,firstRange:i}},this.onFoldWidgetClick=function(e,t){t instanceof s&&(t=t.domEvent);var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),i=this.getLine(e),o="end"===n?-1:1,r=this.getFoldAt(e,-1===o?0:i.length,o);if(r)return t.children||t.all?this.removeFold(r):this.expandFold(r),r;var a=this.getFoldWidgetRange(e,!0);if(a&&!a.isMultiLine()&&(r=this.getFoldAt(a.start.row,a.start.column,1))&&a.isEqual(r.range))return this.removeFold(r),r;if(t.siblings){var s=this.getParentFoldRangeData(e);if(s.range)var l=s.range.start.row+1,c=s.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=a?a.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):a&&(t.all&&(a.collapseChildren=1e4),this.addFold("...",a));return a}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var i=this.getParentFoldRangeData(t,!0);if(n=i.range||i.firstRange){t=n.start.row;var o=this.getFoldAt(t,this.getLine(t).length,1);o?this.removeFold(o):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,n){var i=e("../token_iterator").TokenIterator,o=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),i=!0,r=n.charAt(e.column-1),a=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(a||(r=n.charAt(e.column),e={row:e.row,column:e.column+1},a=r&&r.match(/([\(\[\{])|([\)\]\}])/),i=!1),!a)return null;if(a[1]){if(!(s=this.$findClosingBracket(a[1],e)))return null;t=o.fromPoints(e,s),i||(t.end.column++,t.start.column--),t.cursor=t.end}else{var s;if(!(s=this.$findOpeningBracket(a[2],e)))return null;t=o.fromPoints(s,e),i||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),i=/([\(\[\{])|([\)\]\}])/,r=!t&&n.charAt(e.column-1),a=r&&r.match(i);if(a||(r=(void 0===t||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},a=r&&r.match(i)),!a)return null;var s=new o(e.row,e.column-1,e.row,e.column),l=a[1]?this.$findClosingBracket(a[1],e):this.$findOpeningBracket(a[2],e);return l?[s,new o(l.row,l.column,l.row,l.column+1)]:[s]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var o=this.$brackets[e],r=1,a=new i(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var l=t.column-a.getCurrentTokenColumn()-2,c=s.value;;){for(;l>=0;){var u=c.charAt(l);if(u==o){if(0==(r-=1))return{row:a.getCurrentTokenRow(),column:l+a.getCurrentTokenColumn()}}else u==e&&(r+=1);l-=1}do{s=a.stepBackward()}while(s&&!n.test(s.type));if(null==s)break;l=(c=s.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var o=this.$brackets[e],r=1,a=new i(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var l=t.column-a.getCurrentTokenColumn();;){for(var c=s.value,u=c.length;l"===t.value?i=!0:-1!==t.type.indexOf("tag-name")&&(n=!0))}while(t&&!n);return t},this.$findClosingTag=function(e,t){var n,i=t.value,r=t.value,a=0,s=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var l=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),c=!1;do{if(-1!==(n=t).type.indexOf("tag-close")&&!c){var u=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);c=!0}if(t=e.stepForward())if(">"!==t.value||c||(u=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1),c=!0),-1!==t.type.indexOf("tag-name")){if(r===(i=t.value))if("<"===n.value)a++;else if(""!==t.value)return;var p=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else r===i&&"/>"===t.value&&--a<0&&(p=h=d=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),u=new o(l.end.row,l.end.column,l.end.row,l.end.column+1))}while(t&&a>=0);if(s&&u&&d&&p&&l&&h)return{openTag:new o(s.start.row,s.start.column,u.end.row,u.end.column),closeTag:new o(d.start.row,d.start.column,p.end.row,p.end.column),openTagName:l,closeTagName:h}},this.$findOpeningTag=function(e,t){var n=e.getCurrentToken(),i=t.value,r=0,a=e.getCurrentTokenRow(),s=e.getCurrentTokenColumn(),l=s+2,c=new o(a,s,a,l);e.stepForward();var u=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(-1===t.type.indexOf("tag-close")&&(t=e.stepForward()),t&&">"===t.value){var d=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do{if(t=n,a=e.getCurrentTokenRow(),l=(s=e.getCurrentTokenColumn())+t.value.length,n=e.stepBackward(),t)if(-1!==t.type.indexOf("tag-name")){if(i===t.value)if("<"===n.value){if(++r>0){var h=new o(a,s,a,l),p=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do{t=e.stepForward()}while(t&&">"!==t.value);var m=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else""===t.value){for(var f=0,g=n;g;){if(-1!==g.type.indexOf("tag-name")&&g.value===i){r--;break}if("<"===g.value)break;g=e.stepBackward(),f++}for(var y=0;yn&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},e.prototype.$getRowCacheIndex=function(e,t){for(var n=0,i=e.length-1;n<=i;){var o=n+i>>1,r=e[o];if(t>r)n=o+1;else{if(!(t=t);r++);return(n=i[r])?(n.index=r,n.start=o-n.value.length,n):null},e.prototype.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=o.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},e.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},e.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},e.prototype.getTabString=function(){return this.getUseSoftTabs()?o.stringRepeat(" ",this.getTabSize()):"\t"},e.prototype.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},e.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},e.prototype.setTabSize=function(e){this.setOption("tabSize",e)},e.prototype.getTabSize=function(){return this.$tabSize},e.prototype.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},e.prototype.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},e.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},e.prototype.setOverwrite=function(e){this.setOption("overwrite",e)},e.prototype.getOverwrite=function(){return this.$overwrite},e.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},e.prototype.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},e.prototype.removeGutterCustomWidget=function(e){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(e)},e.prototype.addGutterCustomWidget=function(e,t){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},e.prototype.getBreakpoints=function(){return this.$breakpoints},e.prototype.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(i=!!n.charAt(t-1).match(this.tokenRe)),i||(i=!!n.charAt(t).match(this.tokenRe)),i)var o=this.tokenRe;else o=/^\s+$/.test(n.slice(t-1,t+1))?/\s/:this.nonTokenRe;var r=t;if(r>0){do{r--}while(r>=0&&n.charAt(r).match(o));r++}for(var a=t;ae&&(e=t.screenWidth)})),this.lineWidgetWidth=e},e.prototype.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,o=0,r=this.$foldData[o],a=r?r.start.row:1/0,s=t.length,l=0;la){if((l=r.end.row+1)>=s)break;a=(r=this.$foldData[o++])?r.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},e.prototype.getLine=function(e){return this.doc.getLine(e)},e.prototype.getLines=function(e,t){return this.doc.getLines(e,t)},e.prototype.getLength=function(){return this.doc.getLength()},e.prototype.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},e.prototype.insert=function(e,t){return this.doc.insert(e,t)},e.prototype.remove=function(e){return this.doc.remove(e)},e.prototype.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},e.prototype.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var i=e[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},e.prototype.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;ne.end.column&&(r.start.column+=c),r.end.row==e.end.row&&r.end.column>e.end.column&&(r.end.column+=c)),a&&r.start.row>=e.end.row&&(r.start.row+=a,r.end.row+=a)}if(r.end=this.insert(r.start,i),o.length){var s=e.start,l=r.start,c=(a=l.row-s.row,l.column-s.column);this.addFolds(o.map((function(e){return(e=e.clone()).start.row==s.row&&(e.start.column+=c),e.end.row==s.row&&(e.end.column+=c),e.start.row+=a,e.end.row+=a,e})))}return r},e.prototype.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var i=e;i<=t;i++)this.doc.insertInLine({row:i,column:0},n)},e.prototype.outdentRows=function(e){for(var t=e.collapseRows(),n=new u(0,0,0,0),i=this.getTabSize(),o=t.start.row;o<=t.end.row;++o){var r=this.getLine(o);n.start.row=o,n.end.row=o;for(var a=0;a0){var o;if((o=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;i=o-t}else e=this.$clipRowToDocument(e),i=(t=this.$clipRowToDocument(t))-e+1;var r=new u(e,0,t,Number.MAX_VALUE),a=this.getFoldsInRange(r).map((function(e){return(e=e.clone()).start.row+=i,e.end.row+=i,e})),s=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,s),a.length&&this.addFolds(a),i},e.prototype.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},e.prototype.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},e.prototype.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},e.prototype.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},e.prototype.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},e.prototype.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},e.prototype.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},e.prototype.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},e.prototype.getUseWrapMode=function(){return this.$useWrapMode},e.prototype.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},e.prototype.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var i=this.$constrainWrapLimit(e,n.min,n.max);return i!=this.$wrapLimit&&i>1&&(this.$wrapLimit=i,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},e.prototype.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},e.prototype.getWrapLimit=function(){return this.$wrapLimit},e.prototype.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},e.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},e.prototype.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,i=e.start,o=e.end,r=i.row,a=o.row,s=a-r,l=null;if(this.$updating=!0,0!=s)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(r,s);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var u=0;if(f=this.getFoldLine(o.row)){f.addRemoveChars(o.row,o.column,i.column-o.column),f.shiftRow(-s);var d=this.getFoldLine(r);d&&d!==f&&(d.merge(f),f=d),u=c.indexOf(f)+1}for(;u=o.row&&f.shiftRow(-s);a=r}else{var h=Array(s);h.unshift(r,0);var p=t?this.$wrapData:this.$rowLengthCache;if(p.splice.apply(p,h),c=this.$foldData,u=0,f=this.getFoldLine(r)){var m=f.range.compareInside(i.row,i.column);0==m?(f=f.split(i.row,i.column))&&(f.shiftRow(s),f.addRemoveChars(a,0,o.column-i.column)):-1==m&&(f.addRemoveChars(r,0,o.column-i.column),f.shiftRow(s)),u=c.indexOf(f)+1}for(;u=r&&f.shiftRow(s)}}else s=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),s=-s),(f=this.getFoldLine(r))&&f.addRemoveChars(r,i.column,s);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(r,a):this.$updateRowLengthCache(r,a),l},e.prototype.$updateRowLengthCache=function(e,t){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},e.prototype.$updateWrapData=function(e,t){var n,i,o=this.doc.getAllLines(),r=this.getTabSize(),a=this.$wrapData,s=this.$wrapLimit,l=e;for(t=Math.min(t,o.length-1);l<=t;)(i=this.getFoldLine(l,i))?(n=[],i.walk(function(e,t,i,r){var a;if(null!=e){(a=this.$getDisplayTokens(e,n.length))[0]=b;for(var s=1;st-d;){var h=r+t-d;if(e[h-1]>=C&&e[h]>=C)u(h);else if(e[h]!=b&&e[h]!=w){for(var p=Math.max(h-(t-(t>>2)),r-1);h>p&&e[h]p&&e[h]p&&e[h]==x;)h--}else for(;h>p&&e[h]p?u(++h):(e[h=r+t]==v&&h--,u(h-d))}else{for(;h!=r-1&&e[h]!=b;h--);if(h>r){u(h);continue}for(h=r+t;h39&&r<48||r>57&&r<64?i.push(x):r>=4352&&k(r)?i.push(y,v):i.push(y)}return i},e.prototype.$getStringScreenWidth=function(e,t,n){if(0==t)return[0,0];var i,o;for(null==t&&(t=1/0),n=n||0,o=0;o=4352&&k(i)?n+=2:n+=1,!(n>t));o++);return[n,o]},e.prototype.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},e.prototype.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},e.prototype.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]=0){s=c[u],r=this.$docRowCache[u];var h=e>c[d-1]}else h=!d;for(var p=this.getLength()-1,m=this.getNextFoldLine(r),f=m?m.start.row:1/0;s<=e&&!(s+(l=this.getRowLength(r))>e||r>=p);)s+=l,++r>f&&(r=m.end.row+1,f=(m=this.getNextFoldLine(r,m))?m.start.row:1/0),h&&(this.$docRowCache.push(r),this.$screenRowCache.push(s));if(m&&m.start.row<=r)i=this.getFoldDisplayLine(m),r=m.start.row;else{if(s+l<=e||r>p)return{row:p,column:this.getLine(p).length};i=this.getLine(r),m=null}var g=0,y=Math.floor(e-s);if(this.$useWrapMode){var v=this.$wrapData[r];v&&(o=v[y],y>0&&v.length&&(g=v.indent,a=v[y-1]||v[v.length-1],i=i.substring(a)))}return void 0!==n&&this.$bidiHandler.isBidiRow(s+y,r,y)&&(t=this.$bidiHandler.offsetToCol(n)),a+=this.$getStringScreenWidth(i,t-g)[1],this.$useWrapMode&&a>=o&&(a=o-1),m?m.idxToPosition(a):{row:r,column:a}},e.prototype.documentToScreenPosition=function(e,t){if(void 0===t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var i,o=0,r=null;(i=this.getFoldAt(e,t,1))&&(e=i.start.row,t=i.start.column);var a,s=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),u=l.length;if(u&&c>=0){s=l[c],o=this.$screenRowCache[c];var d=e>l[u-1]}else d=!u;for(var h=this.getNextFoldLine(s),p=h?h.start.row:1/0;s=p){if((a=h.end.row+1)>e)break;p=(h=this.getNextFoldLine(a,h))?h.start.row:1/0}else a=s+1;o+=this.getRowLength(s),s=a,d&&(this.$docRowCache.push(s),this.$screenRowCache.push(o))}var m="";h&&s>=p?(m=this.getFoldDisplayLine(h,e,t),r=h.start.row):(m=this.getLine(e).substring(0,t),r=e);var f=0;if(this.$useWrapMode){var g=this.$wrapData[r];if(g){for(var y=0;m.length>=g[y];)o++,y++;m=m.substring(g[y-1]||0,m.length),f=y>0?g.indent:0}}return this.lineWidgets&&this.lineWidgets[s]&&this.lineWidgets[s].rowsAbove&&(o+=this.lineWidgets[s].rowsAbove),{row:o,column:f+this.$getStringScreenWidth(m)[0]}},e.prototype.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},e.prototype.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},e.prototype.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,i=0,o=(s=0,(t=this.$foldData[s++])?t.start.row:1/0);io&&(i=t.end.row+1,o=(t=this.$foldData[s++])?t.start.row:1/0)}else{e=this.getLength();for(var a=this.$foldData,s=0;sn);r++);return[i,r]})},e.prototype.getPrecedingCharacter=function(){var e=this.selection.getCursor();return 0===e.column?0===e.row?"":this.doc.getNewLineCharacter():this.getLine(e.row)[e.column-1]},e.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},e}();g.$uid=0,g.prototype.$modes=a.$modes,g.prototype.getValue=g.prototype.toString,g.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},g.prototype.$overwrite=!1,g.prototype.$mode=null,g.prototype.$modeId=null,g.prototype.$scrollTop=0,g.prototype.$scrollLeft=0,g.prototype.$wrapLimit=80,g.prototype.$useWrapMode=!1,g.prototype.$wrapLimitRange={min:null,max:null},g.prototype.lineWidgets=null,g.prototype.isFullWidth=k,i.implement(g.prototype,s);var y=1,v=2,b=3,w=4,x=9,C=10,_=11,S=12;function k(e){return!(e<4352)&&(e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}e("./edit_session/folding").Folding.call(g.prototype),e("./edit_session/bracket_match").BracketMatch.call(g.prototype),a.defineOptions(g.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=g})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){var i=e("./lib/lang"),o=e("./lib/oop"),r=e("./range").Range,a=function(){function e(){this.$options={}}return e.prototype.set=function(e){return o.mixin(this.$options,e),this},e.prototype.getOptions=function(){return i.copyObject(this.$options)},e.prototype.setOptions=function(e){this.$options=e},e.prototype.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var i=null;return n.forEach((function(e,n,o,a){return i=new r(e,n,o,a),!(n==a&&t.start&&t.start.start&&0!=t.skipCurrent&&i.isEqual(t.start)&&(i=null,1))})),i},e.prototype.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,o=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),a=[],s=t.re;if(t.$isMultiLine){var l,c=s.length,u=o.length-c;e:for(var d=s.offset||0;d<=u;d++){for(var h=0;hf||(a.push(l=new r(d,f,d+c-1,g)),c>2&&(d=d+c-2))}}else for(var y,v=0;vv&&(v=w),a.push(new r(y.startRow,y.startCol,y.endRow,y.endCol))}}else for(y=i.getMatchOffsets(o[v],s),h=0;h_&&a[h].end.row==S;)h--;for(a=a.slice(v,h+1),v=0,h=a.length;v=i){t+="$";break}var r=e.charCodeAt(n);if(36===r){t+="$$";continue}if(48===r||38===r){t+="$&";continue}if(49<=r&&r<=57){t+="$"+e[n];continue}}t+=e[n]}else{if(++n>=i){t+="\\";break}switch(e.charCodeAt(n)){case 92:t+="\\";break;case 110:t+="\n";break;case 116:t+="\t"}}}return t||e},e.prototype.replace=function(e,t){var n=this.$options,i=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(i){var o=this.$isMultilineSearch(n);o&&(e=e.replace(/\r\n|\r|\n/g,"\n"));var r=i.exec(e);if(!r||!o&&r[0].length!=e.length)return null;if(t=n.regExp?this.parseReplaceString(t):t.replace(/\$/g,"$$$$"),t=e.replace(i,t),n.preserveCase){t=t.split("");for(var a=Math.min(e.length,e.length);a--;){var s=e[a];s&&s.toLowerCase()!=s?t[a]=t[a].toUpperCase():t[a]=t[a].toLowerCase()}t=t.join("")}return t}},e.prototype.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=i.escapeRegExp(n));var o=e.caseSensitive?"gm":"gmi";try{new RegExp(n,"u"),e.$supportsUnicodeFlag=!0,o+="u"}catch(a){e.$supportsUnicodeFlag=!1}if(e.wholeWord&&(n=function(e,t){var n=i.supportsLookbehind();function o(e,i){return void 0===i&&(i=!0),(n&&t.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w")).test(e)||t.regExp?n&&t.$supportsUnicodeFlag?i?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var r=Array.from(e),a=r[0],s=r[r.length-1];return o(a)+e+o(s,!1)}(n,e)),e.$isMultiLine=!t&&/[\n\r]/.test(n),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,o);try{var r=new RegExp(n,o)}catch(a){r=!1}return e.re=r},e.prototype.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),i=[],o=0;oi);s++){var c=e.getLine(a++);o=null==o?c:o+"\n"+c}var u=t.exec(o);if(t.lastIndex=0,u){var d=o.slice(0,u.index).split("\n"),h=u[0].split("\n"),p=n+d.length-1,m=d[d.length-1].length;return{startRow:p,startCol:m,endRow:p+h.length-1,endCol:1==h.length?m+h[0].length:h[h.length-1].length}}}return null},e.prototype.$multiLineBackward=function(e,t,n,i,o){for(var r,a=l(e,i),c=e.getLine(i).length-n,u=i;u>=o;){for(var d=0;d=o;d++){var h=e.getLine(u--);r=null==r?h:h+"\n"+r}var p=s(r,t,c);if(p){var m=r.slice(0,p.index).split("\n"),f=p[0].split("\n"),g=u+m.length,y=m[m.length-1].length;return{startRow:g,startCol:y,endRow:g+f.length-1,endCol:1==f.length?y+f[0].length:f[f.length-1].length}}}return null},e.prototype.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var o=this.$isMultilineSearch(t),r=this.$multiLineForward,a=this.$multiLineBackward,s=1==t.backwards,l=0!=t.skipCurrent,c=n.unicode,u=t.range,d=t.start;d||(d=u?u[s?"end":"start"]:e.selection.getRange()),d.start&&(d=d[l!=s?"end":"start"]);var h=u?u.start.row:0,p=u?u.end.row:e.getLength()-1;if(s)var m=function(e){var n=d.row;if(!g(n,d.column,e)){for(n--;n>=h;n--)if(g(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=p,h=d.row;n>=h;n--)if(g(n,Number.MAX_VALUE,e))return}};else m=function(e){var n=d.row;if(!g(n,d.column,e)){for(n+=1;n<=p;n++)if(g(n,0,e))return;if(0!=t.wrap)for(n=h,p=d.row;n<=p;n++)if(g(n,0,e))return}};if(t.$isMultiLine)var f=n.length,g=function(t,i,o){var r=s?t-f+1:t;if(!(r<0||r+f>e.getLength())){var a=e.getLine(r),l=a.search(n[0]);if(!(!s&&li))return!!o(r,l,r+f-1,u)||void 0}}};else g=s?function(t,r,s){if(o){var l=a(e,n,r,t,h);if(!l)return!1;if(s(l.startRow,l.startCol,l.endRow,l.endCol))return!0}else{var u,d=e.getLine(t),p=[],m=0;for(n.lastIndex=0;u=n.exec(d);){var f=u[0].length;if(m=u.index,!f){if(m>=d.length)break;n.lastIndex=m+=i.skipEmptyMatch(d,m,c)}if(u.index+f>r)break;p.push(u.index,f)}for(var g=p.length-1;g>=0;g-=2){var y=p[g-1];if(s(t,y,t,y+(f=p[g])))return!0}}}:function(t,a,s){if(n.lastIndex=a,o){var l=r(e,n,t,p);if(l){var u=l.endRow<=p?l.endRow-1:p;u>t&&(t=u)}if(!l)return!1;if(s(l.startRow,l.startCol,l.endRow,l.endCol))return!0}else for(var d,h,m=e.getLine(t);h=n.exec(m);){var f=h[0].length;if(s(t,d=h.index,t,d+f))return!0;if(!f&&(n.lastIndex=d+=i.skipEmptyMatch(m,d,c),d>=m.length))return!1}};return{forEach:m}},e}();function s(e,t,n){for(var i=null,o=0;o<=e.length;){t.lastIndex=o;var r=t.exec(e);if(!r)break;var a=r.index+r[0].length;if(a>e.length-n)break;(!i||a>i.index+i[0].length)&&(i=r),o=r.index+1}return i}function l(e,t){var n={row:t,column:0},i=e.doc.positionToIndex(n)+5e3;return e.doc.indexToPosition(i).row+1}t.Search=a})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=e("../lib/keys"),a=e("../lib/useragent"),s=r.KEY_MODS,l=function(){function e(e,t){this.$init(e,t,!1)}return e.prototype.$init=function(e,t,n){this.platform=t||(a.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=n},e.prototype.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},e.prototype.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var i=this.commandKeyBinding;for(var o in i){var r=i[o];if(r==e)delete i[o];else if(Array.isArray(r)){var a=r.indexOf(e);-1!=a&&(r.splice(a,1),1==r.length&&(i[o]=r[0]))}}},e.prototype.bindKey=function(e,t,n){if("object"==typeof e&&e&&(null==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var i="";if(-1!=e.indexOf(" ")){var o=e.split(/\s+/);e=o.pop(),o.forEach((function(e){var t=this.parseKeys(e),n=s[t.hashId]+t.key;i+=(i?" ":"")+n,this._addCommandToBinding(i,"chainKeys")}),this),i+=" "}var r=this.parseKeys(e),a=s[r.hashId]+r.key;this._addCommandToBinding(i+a,t,n)}),this)},e.prototype._addCommandToBinding=function(e,t,n){var i,o=this.commandKeyBinding;if(t)if(!o[e]||this.$singleCommand)o[e]=t;else{Array.isArray(o[e])?-1!=(i=o[e].indexOf(t))&&o[e].splice(i,1):o[e]=[o[e]],"number"!=typeof n&&(n=c(t));var r=o[e];for(i=0;in);i++);r.splice(i,0,t)}else delete o[e]},e.prototype.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),"object"==typeof n&&(n.name||(n.name=t),this.addCommand(n))}}),this)},e.prototype.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},e.prototype.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},e.prototype._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},e.prototype.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),i=r[n];if(r.FUNCTION_KEYS[i])n=r.FUNCTION_KEYS[i].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var o=0,a=t.length;a--;){var s=r.KEY_MODS[t[a]];if(null==s)return"undefined"!=typeof console&&console.error("invalid modifier "+t[a]+" in "+e),!1;o|=s}return{key:n,hashId:o}},e.prototype.findKeyCommand=function(e,t){var n=s[e]+t;return this.commandKeyBinding[n]},e.prototype.handleKeyboard=function(e,t,n,i){if(!(i<0)){var o=s[t]+n,r=this.commandKeyBinding[o];return e.$keyChain&&(e.$keyChain+=" "+o,r=this.commandKeyBinding[e.$keyChain]||r),!r||"chainKeys"!=r&&"chainKeys"!=r[r.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||i>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-o.length-1)),{command:r}):(e.$keyChain=e.$keyChain||o,{command:"null"})}},e.prototype.getStatusText=function(e,t){return t.$keyChain||""},e}();function c(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}var u=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.$singleCommand=!0,i}return o(t,e),t}(l);u.call=function(e,t,n){l.prototype.$init.call(e,t,n,!0)},l.call=function(e,t,n){l.prototype.$init.call(e,t,n,!1)},t.HashHandler=u,t.MultiHashHandler=l})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,n){var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=e("../lib/oop"),a=e("../keyboard/hash_handler").MultiHashHandler,s=e("../lib/event_emitter").EventEmitter,l=function(e){function t(t,n){var i=e.call(this,n,t)||this;return i.byName=i.commands,i.setDefaultHandler("exec",(function(e){return e.args?e.command.exec(e.editor,e.args,e.event,!1):e.command.exec(e.editor,{},e.event,!0)})),i}return o(t,e),t.prototype.exec=function(e,t,n){if(Array.isArray(e)){for(var i=e.length;i--;)if(this.exec(e[i],t,n))return!0;return!1}"string"==typeof e&&(e=this.commands[e]);var o={editor:t,command:e,args:n};return this.canExecute(e,t)?(o.returnValue=this._emit("exec",o),this._signal("afterExec",o),!1!==o.returnValue):(this._signal("commandUnavailable",o),!1)},t.prototype.canExecute=function(e,t){return"string"==typeof e&&(e=this.commands[e]),!(!e||t&&t.$readOnly&&!e.readOnly||0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))},t.prototype.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},t.prototype.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},t.prototype.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))},t}(a);r.implement(l.prototype,s),t.CommandManager=l})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){var i=e("../lib/lang"),o=e("../config"),r=e("../range").Range;function a(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(e){o.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(e){o.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(e){o.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(e,t){"number"!=typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(e){o.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(e){o.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(i.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(e){e.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),o=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),a=e.session.doc.getLine(n.row).length,s=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(n.row),c=n.row+1;c<=o.row+1;c++){var u=i.stringTrimLeft(i.stringTrimRight(e.session.doc.getLine(c)));0!==u.length&&(u=" "+u),l+=u}o.row+10?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+s)):(a=e.session.doc.getLine(n.row).length>a?a+1:a,e.selection.moveCursorTo(n.row,a))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,i=e.selection.rangeList.ranges,o=[];i.length<1&&(i=[e.selection.getRange()]);for(var a=0;a0||e+t=0&&this.$isCustomWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(e+t))return e+t;if(e-t>=0&&this.$isFoldWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(e+t))return e+t}return null},e.prototype.$findNearestAnnotation=function(e){if(this.$isAnnotationVisible(e))return e;for(var t=0;e-t>0||e+t=0&&this.$isAnnotationVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isAnnotationVisible(e+t))return e+t}return null},e.prototype.$focusFoldWidget=function(e){if(null!=e){var t=this.$getFoldWidget(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$focusCustomWidget=function(e){if(null!=e){var t=this.$getCustomWidget(e);t&&(t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus())}},e.prototype.$focusAnnotation=function(e){if(null!=e){var t=this.$getAnnotation(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$blurFoldWidget=function(e){var t=this.$getFoldWidget(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$blurCustomWidget=function(e){var t=this.$getCustomWidget(e);t&&(t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur())},e.prototype.$blurAnnotation=function(e){var t=this.$getAnnotation(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$moveFoldWidgetUp=function(){for(var e=this.activeRowIndex;e>0;)if(e--,this.$isFoldWidgetVisible(e)||this.$isCustomWidgetVisible(e))return this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=e,void(this.$isFoldWidgetVisible(e)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex))},e.prototype.$moveFoldWidgetDown=function(){for(var e=this.activeRowIndex;e0;)if(e--,this.$isAnnotationVisible(e))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,void this.$focusAnnotation(this.activeRowIndex)},e.prototype.$moveAnnotationDown=function(){for(var e=this.activeRowIndex;e=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=e("./lib/oop"),r=e("./lib/dom"),a=e("./lib/lang"),s=e("./lib/useragent"),l=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,u=e("./mouse/fold_handler").FoldHandler,d=e("./keyboard/keybinding").KeyBinding,h=e("./edit_session").EditSession,p=e("./search").Search,m=e("./range").Range,f=e("./lib/event_emitter").EventEmitter,g=e("./commands/command_manager").CommandManager,y=e("./commands/default_commands").commands,v=e("./config"),b=e("./token_iterator").TokenIterator,w=e("./keyboard/gutter_handler").GutterKeyboardHandler,x=e("./config").nls,C=e("./clipboard"),_=e("./lib/keys"),S=e("./lib/event"),k=e("./tooltip").HoverTooltip,E=function(){function e(t,n,i){this.id="editor"+ ++e.$uid,this.session,this.$toDestroy=[];var o=t.getContainerElement();this.container=o,this.renderer=t,this.commands=new g(s.isMac?"mac":"win",y),"object"==typeof document&&(this.textInput=new l(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new u(this)),this.keyBinding=new d(this),this.$search=(new p).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(e,t){t._$emitInputEvent.schedule(31)})),this.setSession(n||i&&i.session||new h("")),v.resetOptions(this),i&&this.setOptions(i),v._signal("editor",this)}return e.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},e.prototype.startOperation=function(e){this.session.startOperation(e)},e.prototype.endOperation=function(e){this.session.endOperation(e)},e.prototype.onStartOperation=function(e){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,e||(this.previousCommand=null)},e.prototype.onEndOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue)return void(this.curOp=null);if(this._signal("beforeEndOperation"),!this.curOp)return;var t=this.curOp.command,n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var i=this.selection.getRange(),o=this.renderer.layerConfig;(i.start.row>=o.lastRow||i.end.row<=o.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},e.prototype.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,i=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var o=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(o)||/\s/.test(t.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},e.prototype.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;v.loadModule(["keybinding",e],(function(i){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(i&&i.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},e.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},e.prototype.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),t&&(t.$editor=null),e&&e._signal("changeEditor",{editor:this}),e&&(e.$editor=this),e&&!e.destroyed&&e.bgTokenizer.scheduleStart()}},e.prototype.getSession=function(){return this.session},e.prototype.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},e.prototype.getValue=function(){return this.session.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.resize=function(e){this.renderer.onResize(e)},e.prototype.setTheme=function(e,t){this.renderer.setTheme(e,t)},e.prototype.getTheme=function(){return this.renderer.getTheme()},e.prototype.setStyle=function(e,t){this.renderer.setStyle(e,t)},e.prototype.unsetStyle=function(e){this.renderer.unsetStyle(e)},e.prototype.getFontSize=function(){return this.getOption("fontSize")||r.computedStyle(this.container).fontSize},e.prototype.setFontSize=function(e){this.setOption("fontSize",e)},e.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&!t.destroyed){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var n=e.getCursorPosition(),i=e.getKeyboardHandler(),o=i&&i.$getDirectionForHighlight&&i.$getDirectionForHighlight(e),r=t.getMatchingBracketRanges(n,o);if(!r){var a=new b(t,n.row,n.column).getCurrentToken();if(a&&/\b(?:tag-open|tag-name)/.test(a.type)){var s=t.getMatchingTags(n);s&&(r=[s.openTagName.isEmpty()?s.openTag:s.openTagName,s.closeTagName.isEmpty()?s.closeTag:s.closeTagName])}}if(!r&&t.$mode.getMatching&&(r=t.$mode.getMatching(e.session)),r){var l="ace_bracket";Array.isArray(r)?1==r.length&&(l="ace_error_bracket"):r=[r],2==r.length&&(0==m.comparePoints(r[0].end,r[1].start)?r=[m.fromPoints(r[0].start,r[1].end)]:0==m.comparePoints(r[0].start,r[1].end)&&(r=[m.fromPoints(r[1].start,r[0].end)])),t.$bracketHighlight={ranges:r,markerIds:r.map((function(e){return t.addMarker(e,l,"text")}))},e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}else e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}}),50)}},e.prototype.focus=function(){this.textInput.focus()},e.prototype.isFocused=function(){return this.textInput.isFocused()},e.prototype.blur=function(){this.textInput.blur()},e.prototype.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},e.prototype.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},e.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},e.prototype.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange()},e.prototype.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},e.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},e.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},e.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},e.prototype.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new m(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},e.prototype.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),i=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",i)}var o=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(o),this._signal("changeSelection")},e.prototype.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,i=t.end.column,o=e.getLine(t.start.row),r=o.substring(n,i);if(!(r.length>5e3)&&/[\w\d]/.test(r)){var a=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:r}),s=o.substring(n-1,i+1);if(a.test(s))return a}}},e.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},e.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},e.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},e.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},e.prototype.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},e.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},e.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},e.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},e.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},e.prototype.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var i=this.selection.getAllRanges(),o=0;os.search(/\S|$/)){var l=s.substr(o.column).search(/\S|$/);n.doc.removeInLine(o.row,o.column,o.column+l)}}this.clearSelection();var c=o.column,u=n.getState(o.row),d=(s=n.getLine(o.row),i.checkOutdent(u,s,e));if(n.insert(o,e),r&&r.selection&&(2==r.selection.length?this.selection.setSelectionRange(new m(o.row,c+r.selection[0],o.row,c+r.selection[1])):this.selection.setSelectionRange(new m(o.row+r.selection[0],r.selection[1],o.row+r.selection[2],r.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var h=i.getNextLineIndent(u,s.slice(0,o.column),n.getTabString());n.insert({row:o.row+1,column:0},h)}d&&i.autoOutdent(u,n,o.row)}},e.prototype.autoIndent=function(){for(var e=this.session,t=e.getMode(),n=this.selection.isEmpty()?[new m(0,0,e.doc.getLength()-1,0)]:this.selection.getAllRanges(),i="",o="",r="",a=e.getTabString(),s=0;s0&&(i=e.getState(u-1),o=e.getLine(u-1),r=t.getNextLineIndent(i,o,a));var d=e.getLine(u),h=t.$getIndent(d);if(r!==h){if(h.length>0){var p=new m(u,0,u,h.length);e.remove(p)}r.length>0&&e.insert({row:u,column:0},r)}t.autoOutdent(i,e,u)}},e.prototype.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},e.prototype.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),e||n.isEmpty()||this.remove()),!e&&this.selection.isEmpty()||this.insert(e,!0),(t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},e.prototype.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},e.prototype.setOverwrite=function(e){this.session.setOverwrite(e)},e.prototype.getOverwrite=function(){return this.session.getOverwrite()},e.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},e.prototype.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},e.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},e.prototype.setDragDelay=function(e){this.setOption("dragDelay",e)},e.prototype.getDragDelay=function(){return this.getOption("dragDelay")},e.prototype.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},e.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},e.prototype.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},e.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},e.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},e.prototype.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},e.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},e.prototype.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},e.prototype.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},e.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},e.prototype.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},e.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},e.prototype.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},e.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},e.prototype.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},e.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},e.prototype.setReadOnly=function(e){this.setOption("readOnly",e)},e.prototype.getReadOnly=function(){return this.getOption("readOnly")},e.prototype.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},e.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},e.prototype.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},e.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},e.prototype.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},e.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,i=n.getState(t.start.row),o=n.getMode().transformAction(i,"deletion",this,n,t);if(0===t.end.column){var r=n.getTextRange(t);if("\n"==r[r.length-1]){var a=n.getLine(t.end.row);/^\s+$/.test(a)&&(t.end.column=a.length)}}o&&(t=o)}this.session.remove(t),this.clearSelection()},e.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},e.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},e.prototype.setGhostText=function(e,t){this.renderer.setGhostText(e,t)},e.prototype.removeGhostText=function(){this.renderer.removeGhostText()},e.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,i,o=this.session.getLine(e.row);tt.toLowerCase()?1:0}));var o=new m(0,0,0,0);for(i=e.first;i<=e.last;i++){var r=t.getLine(i);o.start.row=i,o.end.row=i,o.end.column=r.length,t.replace(o,n[i-e.first])}},e.prototype.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},e.prototype.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},e.prototype.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var i=this.session.getLine(e);n.lastIndex=t)return{value:o[0],start:o.index,end:o.index+o[0].length}}return null},e.prototype.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new m(t,n-1,t,n),o=this.session.getTextRange(i);if(!isNaN(parseFloat(o))&&isFinite(o)){var r=this.getNumberAt(t,n);if(r){var a=r.value.indexOf(".")>=0?r.start+r.value.indexOf(".")+1:r.end,s=r.start+r.value.length-a,l=parseFloat(r.value);l*=Math.pow(10,s),a!==r.end&&n=s&&r<=l&&(n=t,c.selection.clearSelection(),c.moveCursorTo(e,s+i),c.selection.selectTo(e,l+i)),s=l}));for(var u,d=this.$toggleWordPairs,h=0;h=l&&a<=c&&h.match(/((?:https?|ftp):\/\/[\S]+)/)){s=h.replace(/[\s:.,'";}\]]+$/,"");break}l=c}}catch(p){n={error:p}}finally{try{d&&!d.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}return s},e.prototype.openLink=function(){var e=this.selection.getCursor(),t=this.findLinkAt(e.row,e.column);return t&&window.open(t,"_blank"),null!=t},e.prototype.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},e.prototype.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),i=e.isBackwards();if(n.isEmpty()){var o=n.start.row;t.duplicateLines(o,o)}else{var r=i?n.start:n.end,a=t.insert(r,t.getTextRange(n));n.start=r,n.end=a,e.setSelectionRange(n,i)}},e.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},e.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},e.prototype.moveText=function(e,t,n){return this.session.moveText(e,t,n)},e.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},e.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},e.prototype.$moveLines=function(e,t){var n,i,o=this.selection;if(!o.inMultiSelectMode||this.inVirtualSelectionMode){var r=o.toOrientedRange();n=this.$getSelectedRows(r),i=this.session.$moveLines(n.first,n.last,t?0:e),t&&-1==e&&(i=0),r.moveBy(i,0),o.fromOrientedRange(r)}else{var a=o.rangeList.ranges;o.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var s=0,l=0,c=a.length,u=0;up+1)break;p=m.last}for(u--,s=this.session.$moveLines(h,p,t?0:e),t&&-1==e&&(d=u+1);d<=u;)a[d].moveBy(s,0),d++;t||(s=0),l+=s}o.fromOrientedRange(o.ranges[0]),o.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},e.prototype.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},e.prototype.onCompositionStart=function(e){this.renderer.showComposition(e)},e.prototype.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},e.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},e.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},e.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},e.prototype.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},e.prototype.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},e.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},e.prototype.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,o=e*Math.floor(i.height/i.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(o,0)})):!1===t&&(this.selection.moveCursorBy(o,0),this.selection.clearSelection());var r=n.scrollTop;n.scrollBy(0,o*i.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(r)},e.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},e.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},e.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},e.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},e.prototype.scrollPageDown=function(){this.$moveByPage(1)},e.prototype.scrollPageUp=function(){this.$moveByPage(-1)},e.prototype.scrollToRow=function(e){this.renderer.scrollToRow(e)},e.prototype.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},e.prototype.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},e.prototype.getCursorPosition=function(){return this.selection.getCursor()},e.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},e.prototype.getSelectionRange=function(){return this.selection.getRange()},e.prototype.selectAll=function(){this.selection.selectAll()},e.prototype.clearSelection=function(){this.selection.clearSelection()},e.prototype.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},e.prototype.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},e.prototype.jumpToMatching=function(e,t){var n=this.getCursorPosition(),i=new b(this.session,n.row,n.column),o=i.getCurrentToken(),r=0;o&&-1!==o.type.indexOf("tag-name")&&(o=i.stepBackward());var a=o||i.stepForward();if(a){var s,l,c=!1,u={},d=n.column-a.start,h={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(a.value.match(/[{}()\[\]]/g)){for(;d1?u[a.value]++:"=0;--r)this.$tryReplace(n[r],e)&&i++;return this.selection.setSelectionRange(o),i},e.prototype.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},e.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},e.prototype.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&o.mixin(t,e);var i=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(i)||this.$search.$options.needle)||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i});var r=this.$search.find(this.session);return t.preventScroll?r:r?(this.revealRange(r,n),r):(t.backwards?i.start=i.end:i.end=i.start,void this.selection.setRange(i))},e.prototype.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},e.prototype.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},e.prototype.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},e.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach((function(e){e.destroy()})),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},e.prototype.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,i=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var o=this.$scrollAnchor;o.style.cssText="position:absolute",this.container.insertBefore(o,this.container.firstChild);var r=this.on("changeSelection",(function(){i=!0})),a=this.renderer.on("beforeRender",(function(){i&&(t=n.renderer.container.getBoundingClientRect())})),s=this.renderer.on("afterRender",(function(){if(i&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,r=e.$cursorLayer.$pixelPos,a=e.layerConfig,s=r.top-a.offset;null!=(i=r.top>=0&&s+t.top<0||!(r.topwindow.innerHeight)&&null)&&(o.style.top=s+"px",o.style.left=r.left+"px",o.style.height=a.lineHeight+"px",o.scrollIntoView(i)),i=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",r),this.renderer.off("afterRender",s),this.renderer.off("beforeRender",a))}}},e.prototype.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,r.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},e.prototype.prompt=function(e,t,n){var i=this;v.loadModule("ace/ext/prompt",(function(o){o.prompt(i,e,t,n)}))},e}();E.$uid=0,E.prototype.curOp=null,E.prototype.prevOp={},E.prototype.$mergeableCommands=["backspace","del","insertstring"],E.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],o.implement(E.prototype,f),v.defineOptions(E.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){var t=this;if(this.textInput.setReadOnly(e),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(e){var n=!1;if(e&&"keydown"==e.type){if(e&&e.key&&!e.ctrlKey&&!e.metaKey&&(" "==e.key&&e.preventDefault(),n=1==e.key.length),!n)return}else e&&"exec"!==e.type&&(n=!0);if(n){t.hoverTooltip||(t.hoverTooltip=new k);var i=r.createElement("div");i.textContent=x("editor.tooltip.disable-editing","Editing is disabled"),t.hoverTooltip.isOpen||t.hoverTooltip.showForRange(t,t.getSelectionRange(),i)}else t.hoverTooltip&&t.hoverTooltip.isOpen&&t.hoverTooltip.hide()});var n=this.textInput.getElement();e?(S.addListener(n,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(S.removeListener(n,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))}},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?$.attach(this):$.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?$.attach(this):$.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),r.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),r.addCssClass(this.container,"ace_hasPlaceholder");var t=r.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(e){var t,n={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(e){e.blur(),e.renderer.scroller.focus()},readOnly:!0},i=function(e){if(e.target==this.renderer.scroller&&e.keyCode===_.enter){e.preventDefault();var t=this.getCursorPosition().row;this.isRowVisible(t)||this.scrollToLine(t,!0,!0),this.focus()}};e?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(s.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",x("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",x("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",i.bind(this)),this.commands.addCommand(n),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",x("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",x("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),t||(t=new w(this)),t.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",i.bind(this)),this.commands.removeCommand(n),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),t&&t.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(e){this.$textInputAriaLabel=e},initialValue:""},enableMobileMenu:{set:function(e){this.$enableMobileMenu=e},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var $={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=E})),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],(function(e,t,n){var i=e("../lib/dom"),o=function(){function e(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return e.prototype.moveContainer=function(e){i.translate(this.element,0,-e.firstRowScreen*e.lineHeight%this.canvasHeight-e.offset*this.$offsetCoefficient)},e.prototype.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},e.prototype.computeLineTop=function(e,t,n){var i=t.firstRowScreen*t.lineHeight,o=Math.floor(i/this.canvasHeight);return n.documentToScreenRow(e,0)*t.lineHeight-o*this.canvasHeight},e.prototype.computeLineHeight=function(e,t,n){return t.lineHeight*n.getRowLineCount(e)},e.prototype.getLength=function(){return this.cells.length},e.prototype.get=function(e){return this.cells[e]},e.prototype.shift=function(){this.$cacheCell(this.cells.shift())},e.prototype.pop=function(){this.$cacheCell(this.cells.pop())},e.prototype.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=i.createFragment(this.element),n=0;nr&&(l=o.end.row+1,r=(o=t.getNextFoldLine(l,o))?o.start.row:1/0),l>i){for(;this.$lines.getLength()>s+1;)this.$lines.pop();break}(a=this.$lines.get(++s))?a.row=l:(a=this.$lines.createCell(l,e,this.session,u),this.$lines.push(a)),this.$renderCell(a,e,o,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,i=t.$firstLineNumber,o=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(o=t.getLength()+i-1);var r=n?n.getWidth(t,o,e):o.toString().length*e.characterWidth,a=this.$padding||this.$computePadding();(r+=a.left+a.right)===this.gutterWidth||isNaN(r)||(this.gutterWidth=r,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",r))},e.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},e.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n=this.$cursorRow){if(i.row>this.$cursorRow){var o=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&o&&o.start.row==t[n-1].row))break;i=t[n-1]}i.element.className="ace_gutter-active-line "+i.element.className,this.$cursorCell=i;break}}}}},e.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),i=this.oldLastRow;if(this.oldLastRow=n,!t||i0;o--)this.$lines.shift();if(i>n)for(o=this.session.getFoldedRowCount(n+1,i);o>0;o--)this.$lines.pop();e.firstRowi&&this.$lines.push(this.$renderLines(e,i+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$renderLines=function(e,t,n){for(var i=[],o=t,r=this.session.getNextFoldLine(o),a=r?r.start.row:1/0;o>a&&(o=r.end.row+1,a=(r=this.session.getNextFoldLine(o,r))?r.start.row:1/0),!(o>n);){var s=this.$lines.createCell(o,e,this.session,u);this.$renderCell(s,e,r,o),i.push(s),o++}return i},e.prototype.$renderCell=function(e,t,n,o){var r=e.element,a=this.session,s=r.childNodes[0],c=r.childNodes[1],u=r.childNodes[2],d=r.childNodes[3],h=u.firstChild,p=a.$firstLineNumber,m=a.$breakpoints,f=a.$decorations,g=a.gutterRenderer||this.$renderer,y=this.$showFoldWidgets&&a.foldWidgets,v=n?n.start.row:Number.MAX_VALUE,b=t.lineHeight+"px",w=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",x=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",C=(g?g.getText(a,o):o+p).toString();if(this.$highlightGutterLine&&(o==this.$cursorRow||n&&o=v&&this.$cursorRow<=n.end.row)&&(w+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),m[o]&&(w+=m[o]),f[o]&&(w+=f[o]),this.$annotations[o]&&o!==v&&(w+=this.$annotations[o].className),y){var _=y[o];null==_&&(_=y[o]=a.getFoldWidget(o))}if(_){var S="ace_fold-widget ace_"+_,k="start"==_&&o==v&&on.right-t.right?"foldWidgets":void 0},e}();function u(e){var t=document.createTextNode("");e.appendChild(t);var n=i.createElement("span");e.appendChild(n);var o=i.createElement("span");e.appendChild(o);var r=i.createElement("span");return o.appendChild(r),e}c.prototype.$fixedWidth=!1,c.prototype.$highlightGutterLine=!0,c.prototype.$renderer="",c.prototype.$showLineNumbers=!0,c.prototype.$showFoldWidgets=!0,o.implement(c.prototype,a),t.Gutter=c})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,n){var i=e("../range").Range,o=e("../lib/dom"),r=function(){function e(e){this.element=o.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)}return e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setMarkers=function(e){this.markers=e},e.prototype.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},e.prototype.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var i=this.markers[n];if(i.range){var o=i.range.clipRows(e.firstRow,e.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),i.renderer){var r=this.$getTop(o.start.row,e),a=this.$padding+o.start.column*e.characterWidth;i.renderer(t,o,a,r,e)}else"fullLine"==i.type?this.drawFullLineMarker(t,o,i.clazz,e):"screenLine"==i.type?this.drawScreenLineMarker(t,o,i.clazz,e):o.isMultiLine()?"text"==i.type?this.drawTextMarker(t,o,i.clazz,e):this.drawMultiLineMarker(t,o,i.clazz,e):this.drawSingleLineMarker(t,o,i.clazz+" ace_start ace_br15",e)}else i.update(t,this,this.session,e)}if(-1!=this.i)for(;this.ih?4:0)|(c==l?8:0)),o,c==l?0:1,r)},e.prototype.drawMultiLineMarker=function(e,t,n,i,o){var r=this.$padding,a=i.lineHeight,s=this.$getTop(t.start.row,i),l=r+t.start.column*i.characterWidth;if(o=o||"",this.session.$bidiHandler.isBidiRow(t.start.row)?((c=t.clone()).end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,n+" ace_br1 ace_start",i,null,o)):this.elt(n+" ace_br1 ace_start","height:"+a+"px;right:"+r+"px;top:"+s+"px;left:"+l+"px;"+(o||"")),this.session.$bidiHandler.isBidiRow(t.end.row)){var c;(c=t.clone()).start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,n+" ace_br12",i,null,o)}else{s=this.$getTop(t.end.row,i);var u=t.end.column*i.characterWidth;this.elt(n+" ace_br12","height:"+a+"px;width:"+u+"px;top:"+s+"px;left:"+r+"px;"+(o||""))}if(!((a=(t.end.row-t.start.row-1)*i.lineHeight)<=0)){s=this.$getTop(t.start.row+1,i);var d=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(d?" ace_br"+d:""),"height:"+a+"px;right:"+r+"px;top:"+s+"px;left:"+r+"px;"+(o||""))}},e.prototype.drawSingleLineMarker=function(e,t,n,i,o,r){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,i,o,r);var a=i.lineHeight,s=(t.end.column+(o||0)-t.start.column)*i.characterWidth,l=this.$getTop(t.start.row,i),c=this.$padding+t.start.column*i.characterWidth;this.elt(n,"height:"+a+"px;width:"+s+"px;top:"+l+"px;left:"+c+"px;"+(r||""))},e.prototype.drawBidiSingleLineMarker=function(e,t,n,i,o,r){var a=i.lineHeight,s=this.$getTop(t.start.row,i),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(e){this.elt(n,"height:"+a+"px;width:"+(e.width+(o||0))+"px;top:"+s+"px;left:"+(l+e.left)+"px;"+(r||""))}),this)},e.prototype.drawFullLineMarker=function(e,t,n,i,o){var r=this.$getTop(t.start.row,i),a=i.lineHeight;t.start.row!=t.end.row&&(a+=this.$getTop(t.end.row,i)-r),this.elt(n,"height:"+a+"px;top:"+r+"px;left:0;right:0;"+(o||""))},e.prototype.drawScreenLineMarker=function(e,t,n,i,o){var r=this.$getTop(t.start.row,i),a=i.lineHeight;this.elt(n,"height:"+a+"px;top:"+r+"px;left:0;right:0;"+(o||""))},e}();r.prototype.$padding=0,t.Marker=r})),ace.define("ace/layer/text_util",["require","exports","module"],(function(e,t,n){var i=new Set(["text","rparen","lparen"]);t.isTextToken=function(e){return i.has(e)}})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],(function(e,t,n){var i=e("../lib/oop"),o=e("../lib/dom"),r=e("../lib/lang"),a=e("./lines").Lines,s=e("../lib/event_emitter").EventEmitter,l=e("../config").nls,c=e("./text_util").isTextToken,u=function(){function e(e){this.dom=o,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return e.prototype.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},e.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},e.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},e.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},e.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},e.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},e.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},e.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},e.prototype.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},e.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},e.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides!==e&&(this.$highlightIndentGuides=e,e)},e.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;nu&&(s=l.end.row+1,u=(l=this.session.getNextFoldLine(s,l))?l.start.row:1/0),!(s>o);){var d=r[a++];if(d){this.dom.removeChildren(d),this.$renderLine(d,s,s==u&&l),c&&(d.style.top=this.$lines.computeLineTop(s,e,this.session)+"px");var h=e.lineHeight*this.session.getRowLength(s)+"px";d.style.height!=h&&(c=!0,d.style.height=h)}s++}if(c)for(;a0;o--)this.$lines.shift();if(t.lastRow>e.lastRow)for(o=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);o>0;o--)this.$lines.pop();e.firstRowt.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},e.prototype.$renderLinesFragment=function(e,t,n){for(var i=[],r=t,a=this.session.getNextFoldLine(r),s=a?a.start.row:1/0;r>s&&(r=a.end.row+1,s=(a=this.session.getNextFoldLine(r,a))?a.start.row:1/0),!(r>n);){var l=this.$lines.createCell(r,e,this.session),c=l.element;this.dom.removeChildren(c),o.setStyle(c.style,"height",this.$lines.computeLineHeight(r,e,this.session)+"px"),o.setStyle(c.style,"top",this.$lines.computeLineTop(r,e,this.session)+"px"),this.$renderLine(c,r,r==s&&a),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",i.push(l),r++}return i},e.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,i=this.$lines;i.getLength();)i.pop();i.push(this.$renderLinesFragment(e,t,n))},e.prototype.$renderToken=function(e,t,n,i){for(var o,a=this,s=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,u=this.dom.createFragment(this.element),d=0;o=s.exec(i);){var h=o[1],p=o[2],m=o[3],f=o[4],g=o[5];if(a.showSpaces||!p){var y=d!=o.index?i.slice(d,o.index):"";if(d=o.index+o[0].length,y&&u.appendChild(this.dom.createTextNode(y,this.element)),h){var v=a.session.getScreenTabSize(t+o.index),b=a.$tabStrings[v].cloneNode(!0);b.charCount=1,u.appendChild(b),t+=v-1}else p?a.showSpaces?((x=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",x.textContent=r.stringRepeat(a.SPACE_CHAR,p.length),u.appendChild(x)):u.appendChild(this.dom.createTextNode(p,this.element)):m?((x=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",x.textContent=r.stringRepeat(a.SPACE_CHAR,m.length),u.appendChild(x)):f?(t+=1,(x=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",x.className=a.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",x.textContent=a.showSpaces?a.SPACE_CHAR:f,u.appendChild(x)):g&&(t+=1,(x=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",x.className="ace_cjk",x.textContent=g,u.appendChild(x))}}if(u.appendChild(this.dom.createTextNode(d?i.slice(d):i,this.element)),c(n.type))e.appendChild(u);else{var w="ace_"+n.type.replace(/\./g," ace_"),x=this.dom.createElement("span");"fold"==n.type&&(x.style.width=n.value.length*this.config.characterWidth+"px",x.setAttribute("title",l("inline-fold.closed.title","Unfold code"))),x.className=w,x.appendChild(u),e.appendChild(x)}return t+i.length},e.prototype.renderIndentGuide=function(e,t,n){var i=t.search(this.$indentGuideRe);if(i<=0||i>=n)return t;if(" "==t[0]){for(var o=(i-=i%this.tabSize)/this.tabSize,r=0;ro[r].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==e[t.row]&&t.column===e[t.row].length)for(this.$highlightIndentGuideMarker.dir=1,r=t.row+1;r0))return;n=e.element.childNodes[0]}var i=n.childNodes;if(i){var o=i[t-1];o&&o.classList&&o.classList.contains("ace_indent-guide")&&o.classList.add("ace_indent-guide-active")}}},e.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var t=this.$highlightIndentGuideMarker.indentLevel;if(0!==t)if(1===this.$highlightIndentGuideMarker.dir)for(var n=0;n=this.$highlightIndentGuideMarker.start+1){if(i.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(i,t)}}else for(n=e.length-1;n>=0;n--)if(i=e[n],this.$highlightIndentGuideMarker.end&&i.row=a;){s=this.$renderToken(l,s,u,d.substring(0,a-i)),d=d.substring(a-i),i=a,l=this.$createLineElement(),e.appendChild(l);var h=this.dom.createTextNode(r.stringRepeat(" ",n.indent),this.element);h.charCount=0,l.appendChild(h),s=0,a=n[++o]||Number.MAX_VALUE}0!=d.length&&(i+=d.length,s=this.$renderToken(l,s,u,d))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,s,null,"",!0)},e.prototype.$renderSimpleLine=function(e,t){for(var n=0,i=0;ithis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,o,r);n=this.$renderToken(e,n,o,r)}}},e.prototype.$renderOverflowMessage=function(e,t,n,i,o){n&&this.$renderToken(e,t,n,i.slice(0,this.MAX_LINE_LENGTH-t));var r=this.dom.createElement("span");r.className="ace_inline_button ace_keyword ace_toggle_wrap",r.textContent=o?"":"",e.appendChild(r)},e.prototype.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var i=this.$getFoldLineTokens(t,n);else i=this.session.getTokens(t);var o=e;if(i.length){var r=this.session.getRowSplitData(t);r&&r.length?(this.$renderWrappedLine(e,i,r),o=e.lastChild):(o=e,this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o)),this.$renderSimpleLine(o,i))}else this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o));if(this.showEOL&&o){n&&(t=n.end.row);var a=this.dom.createElement("span");a.className="ace_invisible ace_invisible_eol",a.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,o.appendChild(a)}},e.prototype.$getFoldLineTokens=function(e,t){var n=this.session,i=[],o=n.getTokens(e);return t.walk((function(e,t,r,a,s){null!=e?i.push({type:"fold",value:e}):(s&&(o=n.getTokens(t)),o.length&&function(e,t,n){for(var o=0,r=0;r+e[o].value.lengthn-t&&(a=a.substring(0,n-t)),i.push({type:e[o].type,value:a}),r=t+a.length,o+=1);rn?i.push({type:e[o].type,value:a.substring(0,n-r)}):i.push(e[o]),r+=a.length,o+=1}}(o,a,r))}),t.end.row,this.session.getLine(t.end.row).length),i},e.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},e}();u.prototype.EOF_CHAR="¶",u.prototype.EOL_CHAR_LF="¬",u.prototype.EOL_CHAR_CRLF="¤",u.prototype.EOL_CHAR=u.prototype.EOL_CHAR_LF,u.prototype.TAB_CHAR="—",u.prototype.SPACE_CHAR="·",u.prototype.$padding=0,u.prototype.MAX_LINE_LENGTH=1e4,u.prototype.showInvisibles=!1,u.prototype.showSpaces=!1,u.prototype.showTabs=!1,u.prototype.showEOL=!1,u.prototype.displayIndentGuides=!0,u.prototype.$highlightIndentGuides=!0,u.prototype.$tabStrings=[],u.prototype.destroy={},u.prototype.onChangeTabSize=u.prototype.$computeTabString,i.implement(u.prototype,s),t.Text=u})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,n){var i=e("../lib/dom"),o=function(){function e(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return e.prototype.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)i.setStyle(t[n].style,"opacity",e?"":"0")},e.prototype.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&i.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},e.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,i.removeCssClass(this.element,"ace_animate-blinking")},e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},e.prototype.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},e.prototype.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,i.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},e.prototype.addCursor=function(){var e=i.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},e.prototype.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},e.prototype.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,i.removeCssClass(this.element,"ace_smooth-blinking")),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&i.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),i.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}else this.$stopCssAnimation()},e.prototype.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},e.prototype.isCursorInView=function(e,t){return e.top>=0&&e.tope.height+e.offset||a.top<0)&&n>1)){var s=this.cursors[o++]||this.addCursor(),l=s.style;this.drawCursor?this.drawCursor(s,a,e,t[n],this.session):this.isCursorInView(a,e)?(i.setStyle(l,"display","block"),i.translate(s,a.left,a.top),i.setStyle(l,"width",Math.round(e.characterWidth)+"px"),i.setStyle(l,"height",e.lineHeight+"px")):i.setStyle(l,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=a,this.restartTimer()},e.prototype.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},e.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},e}();o.prototype.$padding=0,o.prototype.drawCursor=null,t.Cursor=o})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=e("./lib/oop"),a=e("./lib/dom"),s=e("./lib/event"),l=e("./lib/event_emitter").EventEmitter,c=32768,u=function(){function e(e,t){this.element=a.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+t,this.inner=a.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();r.implement(u.prototype,l);var d=function(e){function t(t,n){var i=e.call(this,t,"-v")||this;return i.scrollTop=0,i.scrollHeight=0,n.$scrollbarWidth=i.width=a.scrollbarWidth(t.ownerDocument),i.inner.style.width=i.element.style.width=(i.width||15)+5+"px",i.$minWidth=0,i}return o(t,e),t.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.element.style.height=e+"px"},t.prototype.setScrollHeight=function(e){this.scrollHeight=e,e>c?(this.coeff=c/e,e=c):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},t.prototype.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)},t}(u);d.prototype.setInnerHeight=d.prototype.setScrollHeight;var h=function(e){function t(t,n){var i=e.call(this,t,"-h")||this;return i.scrollLeft=0,i.height=n.$scrollbarWidth,i.inner.style.height=i.element.style.height=(i.height||15)+5+"px",i}return o(t,e),t.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.setWidth=function(e){this.element.style.width=e+"px"},t.prototype.setInnerWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)},t}(u);t.ScrollBar=d,t.ScrollBarV=d,t.ScrollBarH=h,t.VScrollBar=d,t.HScrollBar=h})),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=e("./lib/oop"),a=e("./lib/dom"),s=e("./lib/event"),l=e("./lib/event_emitter").EventEmitter;a.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var c=function(){function e(e,t){this.element=a.createElement("div"),this.element.className="ace_sb"+t,this.inner=a.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();r.implement(c.prototype,l);var u=function(e){function t(t,n){var i=e.call(this,t,"-v")||this;return i.scrollTop=0,i.scrollHeight=0,i.parent=t,i.width=i.VScrollWidth,i.renderer=n,i.inner.style.width=i.element.style.width=(i.width||15)+"px",i.$minWidth=0,i}return o(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===s.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,i=t.clientY,o=t.clientY,r=this.thumbTop;s.capture(this.inner,(function(e){i=e.clientY}),(function(){clearInterval(a)}));var a=setInterval((function(){if(void 0!==i){var e=n.scrollTopFromThumbTop(r+i-o);e!==n.scrollTop&&n._emit("scroll",{data:e})}}),20);return s.preventDefault(t)}var l=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(l)}),s.preventDefault(t)}},t.prototype.getHeight=function(){return this.height},t.prototype.scrollTopFromThumbTop=function(e){var t=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return(t|=0)<0?t=0:t>this.pageHeight-this.viewHeight&&(t=this.pageHeight-this.viewHeight),t},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},t.prototype.setScrollHeight=function(e,t){(this.pageHeight!==e||t)&&(this.pageHeight=e,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},t.prototype.setScrollTop=function(e){this.scrollTop=e,e<0&&(e=0),this.thumbTop=e*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},t}(c);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var d=function(e){function t(t,n){var i=e.call(this,t,"-h")||this;return i.scrollLeft=0,i.scrollWidth=0,i.height=i.HScrollHeight,i.inner.style.height=i.element.style.height=(i.height||12)+"px",i.renderer=n,i}return o(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===s.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,i=t.clientX,o=t.clientX,r=this.thumbLeft;s.capture(this.inner,(function(e){i=e.clientX}),(function(){clearInterval(a)}));var a=setInterval((function(){if(void 0!==i){var e=n.scrollLeftFromThumbLeft(r+i-o);e!==n.scrollLeft&&n._emit("scroll",{data:e})}}),20);return s.preventDefault(t)}var l=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(l)}),s.preventDefault(t)}},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.scrollLeftFromThumbLeft=function(e){var t=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return(t|=0)<0?t=0:t>this.pageWidth-this.viewWidth&&(t=this.pageWidth-this.viewWidth),t},t.prototype.setWidth=function(e){this.width=Math.max(0,e),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},t.prototype.setScrollWidth=function(e,t){(this.pageWidth!==e||t)&&(this.pageWidth=e,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},t.prototype.setScrollLeft=function(e){this.scrollLeft=e,e<0&&(e=0),this.thumbLeft=e*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},t}(c);d.prototype.setInnerWidth=d.prototype.setScrollWidth,t.ScrollBar=u,t.ScrollBarV=u,t.ScrollBarH=d,t.VScrollBar=u,t.HScrollBar=d})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,n){var i=e("./lib/event"),o=function(){function e(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(i.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}}return e.prototype.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},e.prototype.clear=function(e){var t=this.changes;return this.changes=0,t},e}();t.RenderLoop=o})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,n){var i=e("../lib/oop"),o=e("../lib/dom"),r=e("../lib/lang"),a=e("../lib/event"),s=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,c=512,u="function"==typeof ResizeObserver,d=200,h=function(){function e(e){this.el=o.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=o.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=o.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=r.stringRepeat("X",c),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()}return e.prototype.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",s.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},e.prototype.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},e.prototype.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},e.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=a.onIdle((function t(){e.checkForSizeChanges(),a.onIdle(t,500)}),500)},e.prototype.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},e.prototype.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/c};return 0===t.width||0===t.height?null:t},e.prototype.$measureCharWidth=function(e){return this.$main.textContent=r.stringRepeat(e,c),this.$main.getBoundingClientRect().width/c},e.prototype.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},e.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},e.prototype.$getZoom=function(e){return e&&e.parentElement?(Number(window.getComputedStyle(e).zoom)||1)*this.$getZoom(e.parentElement):1},e.prototype.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=o.buildDom([e(0,0),e(d,0),e(0,d),e(d,d)],this.el)},e.prototype.transformCoordinates=function(e,t){function n(e,t,n){var i=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/i,(+e[1]*n[0]-e[0]*n[1])/i]}function i(e,t){return[e[0]-t[0],e[1]-t[1]]}function o(e,t){return[e[0]+t[0],e[1]+t[1]]}function r(e,t){return[e*t[0],e*t[1]]}function a(e){var t=e.getBoundingClientRect();return[t.left,t.top]}e&&(e=r(1/this.$getZoom(this.el),e)),this.els||this.$initTransformMeasureNodes();var s=a(this.els[0]),l=a(this.els[1]),c=a(this.els[2]),u=a(this.els[3]),h=n(i(u,l),i(u,c),i(o(l,c),o(u,s))),p=r(1+h[0],i(l,s)),m=r(1+h[1],i(c,s));if(t){var f=t,g=h[0]*f[0]/d+h[1]*f[1]/d+1,y=o(r(f[0],p),r(f[1],m));return o(r(1/g/d,y),s)}var v=i(e,s),b=n(i(p,r(h[0],v)),i(m,r(h[1],v)),v);return r(d,b)},e}();h.prototype.$characterSize={width:0,height:0},i.implement(h.prototype,l),t.FontMetrics=h})),ace.define("ace/css/editor-css",["require","exports","module"],(function(e,t,n){n.exports='\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'Source Code Pro\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n forced-color-adjust: none;\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n.ace_invisible {\n font-variant-ligatures: none;\n}\n\n.ace_keyboard-focus:focus {\n box-shadow: inset 0 0 0 2px #5E9ED6;\n outline: none;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n pointer-events: none;\n}\n\n.ace_gutter-cell, .ace_gutter-cell_svg-icons {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell_svg-icons .ace_gutter_annotation {\n margin-left: -14px;\n float: left;\n}\n\n.ace_gutter-cell .ace_gutter_annotation {\n margin-left: -19px;\n float: left;\n}\n\n.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_icon_svg.ace_error {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: darkorange;\n}\n.ace_icon_svg.ace_info {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: royalblue;\n}\n.ace_icon_svg.ace_hint {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");\n background-color: silver;\n}\n\n.ace_icon_svg.ace_error_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n background-color: darkorange;\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts   instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #f5f5f5;\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n padding: 3px 4px;\n position: absolute;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre-wrap;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n overflow: auto;\n max-width: min(33em, 66vw);\n overscroll-behavior: contain;\n}\n.ace_tooltip pre {\n white-space: pre-wrap;\n}\n\n.ace_tooltip.ace_dark {\n background-color: #636363;\n color: #fff;\n}\n\n.ace_tooltip:focus {\n outline: 1px solid #5E9ED6;\n}\n\n.ace_icon {\n display: inline-block;\n width: 18px;\n vertical-align: top;\n}\n\n.ace_icon_svg {\n display: inline-block;\n width: 12px;\n vertical-align: top;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: 12px;\n -webkit-mask-position: center;\n}\n\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\n padding-right: 13px;\n}\n\n.ace_fold-widget, .ace_custom-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_custom-widget {\n background: none;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n position: relative;\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n z-index: 1;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n}\n\n.ace_ghost_text_container > div {\n white-space: pre;\n}\n\n.ghost_text_line_wrapped::after {\n content: "↩";\n position: absolute;\n}\n\n.ace_lineWidgetContainer.ace_ghost_text {\n margin: 0px 4px\n}\n\n.ace_screenreader-only {\n position:absolute;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n.ace_hidden_token {\n display: none;\n}'})),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){var i=e("../lib/dom"),o=e("../lib/oop"),r=e("../lib/event_emitter").EventEmitter,a=function(){function e(e,t){this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(e)}return e.prototype.$createCanvas=function(){this.canvas=i.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},e.prototype.setScrollBarV=function(e){this.$createCanvas(),this.scrollbarV=e,e.element.appendChild(this.canvas),this.setDimensions()},e.prototype.$updateDecorators=function(e){if("function"==typeof this.canvas.getContext){var t=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;this.setDimensions(e);var n=this.canvas.getContext("2d"),i=this.renderer.session.$annotations;if(n.clearRect(0,0,this.canvas.width,this.canvas.height),i){var o={info:1,warning:2,error:3};i.forEach((function(e){e.priority=o[e.type]||null})),i=i.sort((function(e,t){return e.priorityt.priority?1:0}));for(var r=0;rthis.canvasHeight&&(d=this.canvasHeight-h);var p=d-h,m=d+h-p;n.fillStyle=t[i[r].type]||null,n.fillRect(0,p,Math.round(this.oneZoneWidth-1),m)}}var f=this.renderer.session.selection.getCursor();if(f){var g=Math.round(this.getVerticalOffsetForRow(f.row)*this.heightRatio);n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,g,this.canvasWidth,2)}}},e.prototype.getVerticalOffsetForRow=function(e){return e|=0,this.renderer.session.documentToScreenRow(e,0)*this.lineHeight},e.prototype.setDimensions=function(e){e=e||this.renderer.layerConfig,this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeighte&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},e.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},e.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},e.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},e.prototype.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},e.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},e.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},e.prototype.onResize=function(e,t,n,i){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var o=this.container;i||(i=o.clientHeight||o.scrollHeight),!i&&this.$maxLines&&this.lineHeight>1&&(o.style.height&&"0px"!=o.style.height||(o.style.height="1px",i=o.clientHeight||o.scrollHeight)),n||(n=o.clientWidth||o.scrollWidth);var r=this.$updateCachedSize(e,t,n,i);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(r|this.$changes,!0):this.$loop.schedule(r|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},e.prototype.$updateCachedSize=function(e,t,n,i){i-=this.$extraHeight||0;var r=0,a=this.$size,s={width:a.width,height:a.height,scrollerHeight:a.scrollerHeight,scrollerWidth:a.scrollerWidth};if(i&&(e||a.height!=i)&&(a.height=i,r|=this.CHANGE_SIZE,a.scrollerHeight=a.height,this.$horizScroll&&(a.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(a.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",r|=this.CHANGE_SCROLL),n&&(e||a.width!=n)){r|=this.CHANGE_SIZE,a.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,o.setStyle(this.scrollBarH.element.style,"left",t+"px"),o.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),a.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),o.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";o.setStyle(this.scrollBarH.element.style,"right",l),o.setStyle(this.scroller.style,"right",l),o.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(a.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(r|=this.CHANGE_FULL)}return a.$dirty=!n||!i,r&&this._signal("resize",s),r},e.prototype.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},e.prototype.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},e.prototype.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},e.prototype.getAnimatedScroll=function(){return this.$animatedScroll},e.prototype.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},e.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},e.prototype.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},e.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},e.prototype.setHighlightIndentGuides=function(e){this.setOption("highlightIndentGuides",e)},e.prototype.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},e.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},e.prototype.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},e.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},e.prototype.getShowGutter=function(){return this.getOption("showGutter")},e.prototype.setShowGutter=function(e){return this.setOption("showGutter",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=o.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=o.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},e.prototype.getContainerElement=function(){return this.container},e.prototype.getMouseEventTarget=function(){return this.scroller},e.prototype.getTextAreaContainer=function(){return this.container},e.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var i=this.layerConfig,r=n.top,a=n.left;r-=i.offset;var s=t&&t.useTextareaForIME||w.isMobile?this.lineHeight:1;if(r<0||r>i.height-s)o.translate(this.textarea,0,0);else{var l=1,c=this.$size.height-s;if(t)if(t.useTextareaForIME){var u=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(u)[0]}else r+=this.lineHeight+2;else r+=this.lineHeight;(a-=this.scrollLeft)>this.$size.scrollerWidth-l&&(a=this.$size.scrollerWidth-l),a+=this.gutterWidth+this.margin.left,o.setStyle(e,"height",s+"px"),o.setStyle(e,"width",l+"px"),o.translate(this.textarea,Math.min(a,this.$size.scrollerWidth-l),Math.min(r,c))}}}else o.translate(this.textarea,-100,0)}},e.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},e.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},e.prototype.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},e.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},e.prototype.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},e.prototype.setScrollMargin=function(e,t,n,i){var o=this.scrollMargin;o.top=0|e,o.bottom=0|t,o.right=0|i,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,o.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-o.top),this.updateFull()},e.prototype.setMargin=function(e,t,n,i){var o=this.margin;o.top=0|e,o.bottom=0|t,o.right=0|i,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},e.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},e.prototype.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},e.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},e.prototype.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},e.prototype.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},e.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},e.prototype.freeze=function(){this.$frozen=!0},e.prototype.unfreeze=function(){this.$frozen=!1},e.prototype.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var i=this.scrollTop+(n.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;i>0&&(this.scrollTop=i,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),o.translate(this.content,-this.scrollLeft,-n.offset);var r=n.width+2*this.$padding+"px",a=n.minHeight+"px";o.setStyle(this.content.style,"width",r),o.setStyle(this.content.style,"height",a)}if(e&this.CHANGE_H_SCROLL&&(o.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);if(e&this.CHANGE_SCROLL)return this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",e)}else this.$changes|=e},e.prototype.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var i=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||i!=this.$vScroll){i!=this.$vScroll&&(this.$vScroll=i,this.scrollBarV.setVisible(i));var o=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,o,n),this.desiredHeight=n,this._signal("autosize")}},e.prototype.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,i=this.session.getScreenLength()*this.lineHeight,o=this.$getLongestLine(),r=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-o-2*this.$padding<0),a=this.$horizScroll!==r;a&&(this.$horizScroll=r,this.scrollBarH.setVisible(r));var s=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),n=t.height<=2*this.lineHeight);var l=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=c;var u=this.scrollMargin;this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,i-t.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,o+2*this.$padding-t.scrollerWidth+u.right)));var d=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+c<0||this.scrollTop>u.top),h=s!==d;h&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var p,m,f=this.scrollTop%this.lineHeight,g=Math.ceil(l/this.lineHeight)-1,y=Math.max(0,Math.round((this.scrollTop-f)/this.lineHeight)),v=y+g,b=this.lineHeight;y=e.screenToDocumentRow(y,0);var w=e.getFoldLine(y);w&&(y=w.start.row),p=e.documentToScreenRow(y,0),m=e.getRowLength(y)*b,v=Math.min(e.screenToDocumentRow(v,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(v)*b+m,(f=this.scrollTop-p*b)<0&&p>0&&(p=Math.max(0,p+Math.floor(f/b)),f=this.scrollTop-p*b);var x=0;return(this.layerConfig.width!=o||a)&&(x=this.CHANGE_H_SCROLL),(a||h)&&(x|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),h&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:y,firstRowScreen:p,lastRow:v,lineHeight:b,characterWidth:this.characterWidth,minHeight:l,maxHeight:i,offset:f,gutterOffset:b?Math.max(0,Math.ceil((f+t.height-t.scrollerHeight)/b)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(o-this.$padding),x},e.prototype.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1||tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},e.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},e.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},e.prototype.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},e.prototype.updateBreakpoints=function(e){this._rows=e,this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},e.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},e.prototype.showCursor=function(){this.$cursorLayer.showCursor()},e.prototype.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},e.prototype.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var i=this.$cursorLayer.getPixelPosition(e),o=i.left,r=i.top,a=n&&n.top||0,s=n&&n.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+a>r?(t&&l+a>r+this.lineHeight&&(r-=t*this.$size.scrollerHeight),0===r&&(r=-this.scrollMargin.top),this.session.setScrollTop(r)):l+this.$size.scrollerHeight-s=1-this.scrollMargin.top||t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},e.prototype.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var o=e+this.scrollLeft-n.left-this.$padding,r=o/this.characterWidth,a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),s=this.$blockCursor?Math.floor(r):Math.round(r);return{row:a,column:s,side:r-s>0?1:-1,offsetX:o}},e.prototype.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var o=e+this.scrollLeft-n.left-this.$padding,r=o/this.characterWidth,a=this.$blockCursor?Math.floor(r):Math.round(r),s=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(s,Math.max(a,0),o)},e.prototype.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(e,t),o=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,e)?this.session.$bidiHandler.getPosLeft(i.column):Math.round(i.column*this.characterWidth)),r=i.row*this.lineHeight;return{pageX:n.left+o-this.scrollLeft,pageY:n.top+r-this.scrollTop}},e.prototype.visualizeFocus=function(){o.addCssClass(this.container,"ace_focus")},e.prototype.visualizeBlur=function(){o.removeCssClass(this.container,"ace_focus")},e.prototype.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),null==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(o.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},e.prototype.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},e.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),o.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},e.prototype.setGhostText=function(e,t){var n=this.session.selection.cursor,i=t||{row:n.row,column:n.column};this.removeGhostText();var r=this.$calculateWrappedTextChunks(e,i);this.addToken(r[0].text,"ghost_text",i.row,i.column),this.$ghostText={text:e,position:{row:i.row,column:i.column}};var a=o.createElement("div");if(r.length>1){var s,l=this.hideTokensAfterPosition(i.row,i.column);r.slice(1).forEach((function(e){var t=o.createElement("div"),n=o.createElement("span");n.className="ace_ghost_text",e.wrapped&&(t.className="ghost_text_line_wrapped"),0===e.text.length&&(e.text=" "),n.appendChild(o.createTextNode(e.text)),t.appendChild(n),a.appendChild(t),s=t})),l.forEach((function(e){var t=o.createElement("span");x(e.type)||(t.className="ace_"+e.type.replace(/\./g," ace_")),t.appendChild(o.createTextNode(e.value)),s.appendChild(t)})),this.$ghostTextWidget={el:a,row:i.row,column:i.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var c=this.$cursorLayer.getPixelPosition(i,!0),u=this.container.getBoundingClientRect().height,d=r.length*this.lineHeight;if(d0){var c=0;l.push(o[a].length);for(var u=0;u1||Math.abs(e.$size.height-i)>1?e.$resizeTimer.delay():e.$resizeTimer.cancel()})),this.$resizeObserver.observe(this.container)}},e}();C.prototype.CHANGE_CURSOR=1,C.prototype.CHANGE_MARKER=2,C.prototype.CHANGE_GUTTER=4,C.prototype.CHANGE_SCROLL=8,C.prototype.CHANGE_LINES=16,C.prototype.CHANGE_TEXT=32,C.prototype.CHANGE_SIZE=64,C.prototype.CHANGE_MARKER_BACK=128,C.prototype.CHANGE_MARKER_FRONT=256,C.prototype.CHANGE_FULL=512,C.prototype.CHANGE_H_SCROLL=1024,C.prototype.$changes=0,C.prototype.$padding=null,C.prototype.$frozen=!1,C.prototype.STEPS=8,i.implement(C.prototype,y),a.defineOptions(C.prototype,"renderer",{useResizeObserver:{set:function(e){!e&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):e&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(e){this.$gutterLayer.$useSvgGutterIcons=e},initialValue:!1},showFoldedAnnotations:{set:function(e){this.$gutterLayer.$showFoldedAnnotations=e},initialValue:!1},fadeFoldWidgets:{set:function(e){o.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(e){1==this.$textLayer.setHighlightIndentGuides(e)?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(e){this.$gutterLayer.setHighlightGutterLine(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(e){this.$updateCustomScrollbar(e)},initialValue:!1},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!w.isMobile&&!w.isIE}}),t.VirtualRenderer=C})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(e,t,n){var i=e("../lib/oop"),o=e("../lib/net"),r=e("../lib/event_emitter").EventEmitter,a=e("../config");function s(e){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var t=function(e){var t="importScripts('"+o.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(i){var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(t),n.getBlob("application/javascript")}}(e),n=(window.URL||window.webkitURL).createObjectURL(t);return new Worker(n)}return new Worker(e)}var l=function(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,r),this.$createWorkerFromOldConfig=function(t,n,i,o,r){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),a.get("packaged")||!e.toUrl)o=o||a.moduleUrl(n,"worker");else{var l=this.$normalizePath;o=o||l(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach((function(t){c[t]=l(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}return this.$worker=s(o),r&&this.send("importScripts",r),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:i}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return o.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(e){e.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var i=this.callbackId++;this.callbacks[i]=n,t.push(i)}this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker&&this.$worker.postMessage({event:e,data:{data:t.data}})}catch(n){console.error(n.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener,!0)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(l.prototype),t.UIWorkerClient=function(e,t,n){var i=null,o=!1,s=Object.create(r),c=[],u=new l({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),i&&(o?setTimeout(d):d())}});u.setEmitSync=function(e){o=e};var d=function(){var e=c.shift();e.command?i[e.command].apply(i,e.args):e.event&&s._signal(e.event,e.data)};return s.postMessage=function(e){u.onMessage({data:e})},s.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},s.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},a.loadModule(["worker",t],(function(e){for(i=new e[n](s);c.length;)d()})),u},t.WorkerClient=l,t.createWorker=s})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,n){var i=e("./range").Range,o=e("./lib/event_emitter").EventEmitter,r=e("./lib/oop"),a=function(){function e(e,t,n,i,o,r){var a=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=o,this.othersClass=r,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=i,this.$onCursorChange=function(){setTimeout((function(){a.onCursorChange()}))},this.$pos=n;var s=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=s.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)}return e.prototype.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var o=this.pos;o.$insertRight=!0,o.detach(),o.markerId=n.addMarker(new i(o.row,o.column,o.row,o.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var i=t.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),e.others.push(i)})),n.setUndoSelect(!1)},e.prototype.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new i(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)}))}},e.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,r=t.start.column-this.pos.column;if(this.updateAnchors(e),o&&(this.length+=n),o&&!this.session.$fromUndo)if("insert"===e.action)for(var a=this.others.length-1;a>=0;a--){var s={row:(l=this.others[a]).row,column:l.column+r};this.doc.insertMergedLines(s,e.lines)}else if("remove"===e.action)for(a=this.others.length-1;a>=0;a--){var l;s={row:(l=this.others[a]).row,column:l.column+r},this.doc.remove(new i(s.row,s.column,s.row,s.column-n))}this.$updating=!1,this.updateMarkers()}},e.prototype.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},e.prototype.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,o){t.removeMarker(n.markerId),n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+e.length),o,null,!1)};n(this.pos,this.mainClass);for(var o=this.others.length;o--;)n(this.others[o],this.othersClass)}},e.prototype.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},e.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},e.prototype.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var i=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new i(t.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(e,t,n){var i=e("./range_list").RangeList,o=e("./range").Range,r=e("./selection").Selection,a=e("./mouse/multi_select_handler").onMouseDown,s=e("./lib/event"),l=e("./lib/lang"),c=e("./commands/multi_select_commands");t.commands=c.defaultCommands.concat(c.multiSelectCommands);var u=new(0,e("./search").Search),d=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(d.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var i=this.rangeList.add(e);return this.$onAddRange(e),i.length&&this.$onRemoveRange(i),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var i=this.ranges.indexOf(e[n]);this.ranges.splice(i,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n1){var e=this.rangeList.ranges,t=e[e.length-1],n=o.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var i=this.session.documentToScreenPosition(this.cursor),r=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(i,r).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var i=[],r=e.column0;)v--;if(v>0)for(var b=0;i[b].isEmpty();)b++;for(var w=v;w>=b;w--)i[w].isEmpty()&&i.splice(w,1)}return i}}.call(r.prototype);var h=e("./editor").Editor;function p(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",a),e.commands.addCommands(c.defaultCommands),function(e){if(e.textInput){var t=e.textInput.getElement(),n=!1;s.addListener(t,"keydown",(function(t){var o=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&o?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&i()}),e),s.addListener(t,"keyup",i,e),s.addListener(t,"blur",i,e)}function i(t){n&&(e.renderer.setMouseCursor(""),n=!1)}}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var i=e[n];if(i.marker){this.session.removeMarker(i.marker);var o=t.indexOf(i);-1!=o&&t.splice(o,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?i=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?i=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),i=t.exec(n,e.args||{})):i=t.multiSelectAction(n,e.args||{});else{var i=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var i,o=n&&n.keepOrder,a=1==n||n&&n.$byLines,s=this.session,l=this.selection,c=l.rangeList,u=(o?l:c).ranges;if(!u.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var d=l._eventRegistry;l._eventRegistry={};var h=new r(s);this.inVirtualSelectionMode=!0;for(var p=u.length;p--;){if(a)for(;p>0&&u[p].start.row==u[p-1].end.row;)p--;h.fromOrientedRange(u[p]),h.index=p,this.selection=s.selection=h;var m=e.exec?e.exec(this,t||{}):e(this,t||{});i||void 0===m||(i=m),h.toOrientedRange(u[p])}h.detach(),this.selection=s.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=d,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var f=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),f&&f.from==f.to&&this.renderer.animateScrolling(f.from),i}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],i=0;ia&&(a=n.column),iu?e.insert(i,l.stringRepeat(" ",r-u)):e.remove(new o(i.row,i.column,i.row,i.column-r+u)),t.start.column=t.end.column=a,t.start.row=t.end.row=i.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),d=u.start.row,h=u.end.row,p=d==h;if(p){var m,f=this.session.getLength();do{m=this.session.getLine(h)}while(/[=:]/.test(m)&&++h0);d<0&&(d=0),h>=f&&(h=f-1)}var g=this.session.removeFullLines(d,h);g=this.$reAlignText(g,p),this.session.insert({row:d,column:0},g.join("\n")+"\n"),p||(u.start.column=0,u.end.column=g[g.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(e,t){var n,i,o,r=!0,a=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,i=t[2].length,o=t[3].length,t):(n+i+o!=t[1].length+t[2].length+t[3].length&&(a=!1),n!=t[1].length&&(r=!1),n>t[1].length&&(n=t[1].length),it[3].length&&(o=t[3].length),t):[e]})).map(t?c:r?a?function(e){return e[2]?s(n+i-e[2].length)+e[2]+s(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?s(n)+e[2]+s(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function s(e){return l.stringRepeat(" ",e)}function c(e){return e[2]?s(n)+e[2]+s(i-e[2].length+o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(h.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=p,e("./config").defineOptions(h.prototype,"editor",{enableMultiselect:{set:function(e){p(this),e?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,n){var i=e("../../range").Range,o=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var o=/\S/,r=e.getLine(t),a=r.search(o);if(-1!=a){for(var s=n||r.length,l=e.getLength(),c=t,u=t;++tc){var p=e.getLine(u).length;return new i(c,s,u,p)}}},this.openingBracketBlock=function(e,t,n,o,r){var a={row:n,column:o+1},s=e.$findClosingBracket(t,a,r);if(s){var l=e.foldWidgets[s.row];return null==l&&(l=e.getFoldWidget(s.row)),"start"==l&&s.row>a.row&&(s.row--,s.column=e.getLine(s.row).length),i.fromPoints(a,s)}},this.closingBracketBlock=function(e,t,n,o,r){var a={row:n,column:o},s=e.$findOpeningBracket(t,a);if(s)return s.column++,a.column--,i.fromPoints(s,a)}}).call(o.prototype)})),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],(function(e,t,n){var i=e("../lib/dom"),o=e("../range").Range,r=e("../config").nls;t.showErrorMarker=function(e,t){var n=e.session,a=e.getCursorPosition(),s=a.row,l=n.widgetManager.getWidgetsAtRow(s).filter((function(e){return"errorMarker"==e.type}))[0];l?l.destroy():s-=t;var c,u=function(e,t,n){var i=e.getAnnotations().sort(o.comparePoints);if(i.length){var r=function(e,t,n){for(var i=0,o=e.length-1;i<=o;){var r=i+o>>1,a=n(t,e[r]);if(a>0)i=r+1;else{if(!(a<0))return r;o=r-1}}return-(i+1)}(i,{row:t,column:-1},o.comparePoints);r<0&&(r=-r-1),r>=i.length?r=n>0?0:i.length-1:0===r&&n<0&&(r=i.length-1);var a=i[r];if(a&&n){if(a.row===t){do{a=i[r+=n]}while(a&&a.row===t);if(!a)return i.slice()}var s=[];t=a.row;do{s[n<0?"unshift":"push"](a),a=i[r+=n]}while(a&&a.row==t);return s.length&&s}}}(n,s,t);if(u){var d=u[0];a.column=(d.pos&&"number"!=typeof d.column?d.pos.sc:d.column)||0,a.row=d.row,c=e.renderer.$gutterLayer.$annotations[a.row]}else{if(l)return;c={displayText:[r("error-marker.good-state","Looks good!")],className:"ace_ok"}}e.session.unfold(a.row),e.selection.moveToPosition(a);var h={row:a.row,fixedWidth:!0,coverGutter:!0,el:i.createElement("div"),type:"errorMarker"},p=h.el.appendChild(i.createElement("div")),m=h.el.appendChild(i.createElement("div"));m.className="error_widget_arrow "+c.className;var f=e.renderer.$cursorLayer.getPixelPosition(a).left;m.style.left=f+e.renderer.gutterWidth-5+"px",h.el.className="error_widget_wrapper",p.className="error_widget "+c.className,c.displayText.forEach((function(e,t){p.appendChild(i.createTextNode(e)),ts))return!1;var c=r.get(e);if(c&&r.get(t))return c==t;var u=-1,d=!0,h=2&n?new we:void 0;for(r.set(e,t),r.set(t,e);++u-1},ve.prototype.set=function(e,t){var n=this.__data__,i=Ce(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},be.prototype.clear=function(){this.size=0,this.__data__={hash:new ge,map:new(oe||ve),string:new ge}},be.prototype.delete=function(e){var t=Me(this,e).delete(e);return this.size-=t?1:0,t},be.prototype.get=function(e){return Me(this,e).get(e)},be.prototype.has=function(e){return Me(this,e).has(e)},be.prototype.set=function(e,t){var n=Me(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},we.prototype.add=we.prototype.push=function(e){return this.__data__.set(e,n),this},we.prototype.has=function(e){return this.__data__.has(e)},xe.prototype.clear=function(){this.__data__=new ve,this.size=0},xe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},xe.prototype.get=function(e){return this.__data__.get(e)},xe.prototype.has=function(e){return this.__data__.has(e)},xe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ve){var i=n.__data__;if(!oe||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new be(i)}return n.set(e,t),this.size=n.size,this};var Ae=ee?function(e){return null==e?[]:(e=Object(e),function(t){for(var n=-1,i=null==t?0:t.length,o=0,r=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=i}function ze(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Fe(e){return null!=e&&"object"==typeof e}var Ve=O?function(e){return function(t){return e(t)}}(O):function(e){return Fe(e)&&Pe(e.length)&&!!C[_e(e)]};function Be(e){return null!=(t=e)&&Pe(t.length)&&!He(t)?function(e,t){var n=Ie(e),i=!n&&Le(e),o=!n&&!i&&De(e),r=!n&&!i&&!o&&Ve(e),a=n||i||o||r,s=a?function(e,t){for(var n=-1,i=Array(e);++n0&&this.handleMarkers(x);var k=this.editor.$options;pK.editorOptions.forEach((function(t){k.hasOwnProperty(t)?e.editor.setOption(t,e.props[t]):e.props[t]&&console.warn("ReactAce: editor option ".concat(t," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))})),this.handleOptions(this.props),Array.isArray(b)&&b.forEach((function(t){"string"==typeof t.exec?e.editor.commands.bindKey(t.bindKey,t.exec):e.editor.commands.addCommand(t)})),y&&this.editor.setKeyboardHandler("ace/keyboard/"+y),n&&(this.refEditor.className+=" "+n),v&&v(this.editor),this.editor.resize(),a&&this.editor.focus()},t.prototype.componentDidUpdate=function(e){for(var t=e,n=this.props,i=0;i 0!";if(e!=this.$splits){if(e>this.$splits){for(;this.$splitse;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach((function(t){t.setTheme(e)}))},this.setKeyboardHandler=function(e){this.$editors.forEach((function(t){t.setKeyboardHandler(e)}))},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach((function(t){t.setFontSize(e)}))},this.$cloneSession=function(e){var t=new l(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;return n=null==t?this.$cEditor:this.$editors[t],this.$editors.some((function(t){return t.session===e}))&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e,t=this.$container.clientWidth,n=this.$container.clientHeight;if(this.$orientation==this.BESIDE)for(var i=t/this.$splits,o=0;o-1},ZK.prototype.set=function(e,t){var n=this.__data__,i=qK(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},GK.prototype.clear=function(){this.__data__={hash:new YK,map:new(VK||ZK),string:new YK}},GK.prototype.delete=function(e){return KK(this,e).delete(e)},GK.prototype.get=function(e){return KK(this,e).get(e)},GK.prototype.has=function(e){return KK(this,e).has(e)},GK.prototype.set=function(e,t){return KK(this,e).set(e,t),this};var XK=eQ((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(iQ(e))return UK?UK.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return SK.test(e)&&n.push(""),e.replace(kK,(function(e,t,i,o){n.push(i?o.replace(EK,"$1"):t||e)})),n}));function JK(e){if("string"==typeof e||iQ(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function eQ(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,o=t?t.apply(this,i):i[0],r=n.cache;if(r.has(o))return r.get(o);var a=e.apply(this,i);return n.cache=r.set(o,a),a};return n.cache=new(eQ.Cache||GK),n}eQ.Cache=GK;var tQ=Array.isArray;function nQ(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function iQ(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==HK.call(e)}var oQ=ye&&ye.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),rQ=ye&&ye.__assign||function(){return rQ=Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&e.handleMarkers(x,t),i=0;ii.length?e:i,l=e.length>i.length?i:e,c=s.indexOf(l);if(-1!=c)return a=[new t.Diff(1,s.substring(0,c)),new t.Diff(0,l),new t.Diff(1,s.substring(c+l.length))],e.length>i.length&&(a[0][0]=a[2][0]=n),a;if(1==l.length)return[new t.Diff(n,e),new t.Diff(1,i)];var u=this.diff_halfMatch_(e,i);if(u){var d=u[0],h=u[1],p=u[2],m=u[3],f=u[4],g=this.diff_main(d,p,o,r),y=this.diff_main(h,m,o,r);return g.concat([new t.Diff(0,f)],y)}return o&&e.length>100&&i.length>100?this.diff_lineMode_(e,i,r):this.diff_bisect_(e,i,r)},t.prototype.diff_lineMode_=function(e,i,o){var r=this.diff_linesToChars_(e,i);e=r.chars1,i=r.chars2;var a=r.lineArray,s=this.diff_main(e,i,!1,o);this.diff_charsToLines_(s,a),this.diff_cleanupSemantic(s),s.push(new t.Diff(0,""));for(var l=0,c=0,u=0,d="",h="";l=1&&u>=1){s.splice(l-c-u,c+u),l=l-c-u;for(var p=this.diff_main(d,h,!1,o),m=p.length-1;m>=0;m--)s.splice(l,0,p[m]);l+=p.length}u=0,c=0,d="",h=""}l++}return s.pop(),s},t.prototype.diff_bisect_=function(e,i,o){for(var r=e.length,a=i.length,s=Math.ceil((r+a)/2),l=s,c=2*s,u=new Array(c),d=new Array(c),h=0;ho);b++){for(var w=-b+f;w<=b-g;w+=2){for(var x=l+w,C=($=w==-b||w!=b&&u[x-1]r)g+=2;else if(C>a)f+=2;else if(m&&(k=l+p-w)>=0&&k=(S=r-d[k]))return this.diff_bisectSplit_(e,i,$,C,o)}for(var _=-b+y;_<=b-v;_+=2){for(var S,k=l+_,E=(S=_==-b||_!=b&&d[k-1]r)v+=2;else if(E>a)y+=2;else if(!m){var $;if((x=l+p-_)>=0&&x=(S=r-S)))return this.diff_bisectSplit_(e,i,$,C,o)}}}return[new t.Diff(n,e),new t.Diff(1,i)]},t.prototype.diff_bisectSplit_=function(e,t,n,i,o){var r=e.substring(0,n),a=t.substring(0,i),s=e.substring(n),l=t.substring(i),c=this.diff_main(r,a,!1,o),u=this.diff_main(s,l,!1,o);return c.concat(u)},t.prototype.diff_linesToChars_=function(e,t){var n=[],i={};function o(e){for(var t="",o=0,a=-1,s=n.length;ai?e=e.substring(n-i):nt.length?e:t,i=e.length>t.length?t:e;if(n.length<4||2*i.length=e.length?[i,r,a,s,u]:null}var a,s,l,c,u,d=r(n,i,Math.ceil(n.length/4)),h=r(n,i,Math.ceil(n.length/2));return d||h?(a=h?d&&d[4].length>h[4].length?d:h:d,e.length>t.length?(s=a[0],l=a[1],c=a[2],u=a[3]):(c=a[0],u=a[1],s=a[2],l=a[3]),[s,l,c,u,a[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var i=!1,o=[],r=0,a=null,s=0,l=0,c=0,u=0,d=0;s0?o[r-1]:-1,l=0,c=0,u=0,d=0,a=null,i=!0)),s++;for(i&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),s=1;s=f?(m>=h.length/2||m>=p.length/2)&&(e.splice(s,0,new t.Diff(0,p.substring(0,m))),e[s-1][1]=h.substring(0,h.length-m),e[s+1][1]=p.substring(m),s++):(f>=h.length/2||f>=p.length/2)&&(e.splice(s,0,new t.Diff(0,h.substring(0,f))),e[s-1][0]=1,e[s-1][1]=p.substring(0,p.length-f),e[s+1][0]=n,e[s+1][1]=h.substring(f),s++),s++}s++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var i=e.charAt(e.length-1),o=n.charAt(0),r=i.match(t.nonAlphaNumericRegex_),a=o.match(t.nonAlphaNumericRegex_),s=r&&i.match(t.whitespaceRegex_),l=a&&o.match(t.whitespaceRegex_),c=s&&i.match(t.linebreakRegex_),u=l&&o.match(t.linebreakRegex_),d=c&&e.match(t.blanklineEndRegex_),h=u&&n.match(t.blanklineStartRegex_);return d||h?5:c||u?4:r&&!s&&l?3:s||l?2:r||a?1:0}for(var i=1;i=h&&(h=p,c=o,u=r,d=a)}e[i-1][1]!=c&&(c?e[i-1][1]=c:(e.splice(i-1,1),i--),e[i][1]=u,d?e[i+1][1]=d:(e.splice(i+1,1),i--))}i++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var i=!1,o=[],r=0,a=null,s=0,l=!1,c=!1,u=!1,d=!1;s0?o[r-1]:-1,u=d=!1),i=!0)),s++;i&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var i,o=0,r=0,a=0,s="",l="";o1?(0!==r&&0!==a&&(0!==(i=this.diff_commonPrefix(l,s))&&(o-r-a>0&&0==e[o-r-a-1][0]?e[o-r-a-1][1]+=l.substring(0,i):(e.splice(0,0,new t.Diff(0,l.substring(0,i))),o++),l=l.substring(i),s=s.substring(i)),0!==(i=this.diff_commonSuffix(l,s))&&(e[o][1]=l.substring(l.length-i)+e[o][1],l=l.substring(0,l.length-i),s=s.substring(0,s.length-i))),o-=r+a,e.splice(o,r+a),s.length&&(e.splice(o,0,new t.Diff(n,s)),o++),l.length&&(e.splice(o,0,new t.Diff(1,l)),o++),o++):0!==o&&0==e[o-1][0]?(e[o-1][1]+=e[o][1],e.splice(o,1)):o++,a=0,r=0,s="",l=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(o=1;ot));i++)a=o,s=r;return e.length!=i&&e[i][0]===n?s:s+(t-a)},t.prototype.diff_prettyHtml=function(e){for(var t=[],i=/&/g,o=//g,a=/\n/g,s=0;s");switch(l){case 1:t[s]=''+c+"";break;case n:t[s]=''+c+"";break;case 0:t[s]=""+c+""}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var i=this.match_alphabet_(t),o=this;function r(e,i){var r=e/t.length,a=Math.abs(n-i);return o.Match_Distance?r+a/o.Match_Distance:a?1:r}var a=this.Match_Threshold,s=e.indexOf(t,n);-1!=s&&(a=Math.min(r(0,s),a),-1!=(s=e.lastIndexOf(t,n+t.length))&&(a=Math.min(r(0,s),a)));var l,c,u=1<=m;y--){var v=i[e.charAt(y-1)];if(g[y]=0===p?(g[y+1]<<1|1)&v:(g[y+1]<<1|1)&v|(d[y+1]|d[y])<<1|1|d[y+1],g[y]&u){var b=r(p,y-1);if(b<=a){if(a=b,!((s=y-1)>n))break;m=Math.max(1,2*n-s)}}}if(r(p+1,n)>a)break;d=g}return s},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(e&&"object"==typeof e&&void 0===i&&void 0===o)a=e,r=this.diff_text1(a);else if("string"==typeof e&&i&&"object"==typeof i&&void 0===o)r=e,a=i;else{if("string"!=typeof e||"string"!=typeof i||!o||"object"!=typeof o)throw new Error("Unknown call format to patch_make.");r=e,a=o}if(0===a.length)return[];for(var s=[],l=new t.patch_obj,c=0,u=0,d=0,h=r,p=r,m=0;m=2*this.Patch_Margin&&c&&(this.patch_addContext_(l,h),s.push(l),l=new t.patch_obj,c=0,h=p,u=d)}1!==f&&(u+=g.length),f!==n&&(d+=g.length)}return c&&(this.patch_addContext_(l,h),s.push(l)),s},t.prototype.patch_deepCopy=function(e){for(var n=[],i=0;ithis.Match_MaxBits?-1!=(s=this.match_main(t,u.substring(0,this.Match_MaxBits),c))&&(-1==(d=this.match_main(t,u.substring(u.length-this.Match_MaxBits),c+u.length-this.Match_MaxBits))||s>=d)&&(s=-1):s=this.match_main(t,u,c),-1==s)r[a]=!1,o-=e[a].length2-e[a].length1;else if(r[a]=!0,o=s-c,u==(l=-1==d?t.substring(s,s+u.length):t.substring(s,d+this.Match_MaxBits)))t=t.substring(0,s)+this.diff_text2(e[a].diffs)+t.substring(s+u.length);else{var h=this.diff_main(u,l,!1);if(u.length>this.Match_MaxBits&&this.diff_levenshtein(h)/u.length>this.Patch_DeleteThreshold)r[a]=!1;else{this.diff_cleanupSemanticLossless(h);for(var p,m=0,f=0;fa[0][1].length){var s=n-a[0][1].length;a[0][1]=i.substring(a[0][1].length)+a[0][1],r.start1-=s,r.start2-=s,r.length1+=s,r.length2+=s}return 0==(a=(r=e[e.length-1]).diffs).length||0!=a[a.length-1][0]?(a.push(new t.Diff(0,i)),r.length1+=n,r.length2+=n):n>a[a.length-1][1].length&&(s=n-a[a.length-1][1].length,a[a.length-1][1]+=i.substring(0,s),r.length1+=s,r.length2+=s),i},t.prototype.patch_splitMax=function(e){for(var i=this.Match_MaxBits,o=0;o2*i?(c.length1+=h.length,a+=h.length,u=!1,c.diffs.push(new t.Diff(d,h)),r.diffs.shift()):(h=h.substring(0,i-c.length1-this.Patch_Margin),c.length1+=h.length,a+=h.length,0===d?(c.length2+=h.length,s+=h.length):u=!1,c.diffs.push(new t.Diff(d,h)),h==r.diffs[0][1]?r.diffs.shift():r.diffs[0][1]=r.diffs[0][1].substring(h.length))}l=(l=this.diff_text2(c.diffs)).substring(l.length-this.Patch_Margin);var p=this.diff_text1(r.diffs).substring(0,this.Patch_Margin);""!==p&&(c.length1+=p.length,c.length2+=p.length,0!==c.diffs.length&&0===c.diffs[c.diffs.length-1][0]?c.diffs[c.diffs.length-1][1]+=p:c.diffs.push(new t.Diff(0,p))),u||e.splice(++o,0,c)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;nc)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=r)break;if(u.isMultiLine())t=u.end.row;else if(i==c)break}s=t}}return new o(r,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var i=t.search(/\s*$/),r=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++na)return new o(a,i,n,t.length)}}.call(a.prototype)})),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],(function(e,t,n){var i=e("../lib/oop"),o=e("./text").Mode,r=e("./css_highlight_rules").CssHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./css_completions").CssCompletions,c=e("./behaviour/css").CssBehaviour,u=e("./folding/cstyle").FoldMode,d=function(){this.HighlightRules=r,this.$outdent=new a,this.$behaviour=new c,this.$completer=new l,this.foldingRules=new u};i.inherits(d,o),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e).tokens;return o.length&&"comment"==o[o.length-1].type||t.match(/^.*\{\s*$/)&&(i+=n),i},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,i){return this.$completer.getCompletions(e,t,n,i)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",(function(t){e.setAnnotations(t.data)})),t.on("terminate",(function(){e.clearAnnotations()})),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(d.prototype),t.Mode=d})),ace.require(["ace/mode/css"],(function(t){e&&(e.exports=t)}))}({exports:{}}),function(e){ace.define("ace/theme/dracula-css",["require","exports","module"],(function(e,t,n){n.exports='/*\n * Copyright © 2017 Zeno Rocha \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n.ace-dracula .ace_gutter {\n background: #282a36;\n color: rgb(144,145,148)\n}\n\n.ace-dracula .ace_print-margin {\n width: 1px;\n background: #44475a\n}\n\n.ace-dracula {\n background-color: #282a36;\n color: #f8f8f2\n}\n\n.ace-dracula .ace_cursor {\n color: #f8f8f0\n}\n\n.ace-dracula .ace_marker-layer .ace_selection {\n background: #44475a\n}\n\n.ace-dracula.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #282a36;\n border-radius: 2px\n}\n\n.ace-dracula .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174)\n}\n\n.ace-dracula .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #a29709\n}\n\n.ace-dracula .ace_marker-layer .ace_active-line {\n background: #44475a\n}\n\n.ace-dracula .ace_gutter-active-line {\n background-color: #44475a\n}\n\n.ace-dracula .ace_marker-layer .ace_selected-word {\n box-shadow: 0px 0px 0px 1px #a29709;\n border-radius: 3px;\n}\n\n.ace-dracula .ace_fold {\n background-color: #50fa7b;\n border-color: #f8f8f2\n}\n\n.ace-dracula .ace_keyword {\n color: #ff79c6\n}\n\n.ace-dracula .ace_constant.ace_language {\n color: #bd93f9\n}\n\n.ace-dracula .ace_constant.ace_numeric {\n color: #bd93f9\n}\n\n.ace-dracula .ace_constant.ace_character {\n color: #bd93f9\n}\n\n.ace-dracula .ace_constant.ace_character.ace_escape {\n color: #ff79c6\n}\n\n.ace-dracula .ace_constant.ace_other {\n color: #bd93f9\n}\n\n.ace-dracula .ace_support.ace_function {\n color: #8be9fd\n}\n\n.ace-dracula .ace_support.ace_constant {\n color: #6be5fd\n}\n\n.ace-dracula .ace_support.ace_class {\n font-style: italic;\n color: #66d9ef\n}\n\n.ace-dracula .ace_support.ace_type {\n font-style: italic;\n color: #66d9ef\n}\n\n.ace-dracula .ace_storage {\n color: #ff79c6\n}\n\n.ace-dracula .ace_storage.ace_type {\n font-style: italic;\n color: #8be9fd\n}\n\n.ace-dracula .ace_invalid {\n color: #F8F8F0;\n background-color: #ff79c6\n}\n\n.ace-dracula .ace_invalid.ace_deprecated {\n color: #F8F8F0;\n background-color: #bd93f9\n}\n\n.ace-dracula .ace_string {\n color: #f1fa8c\n}\n\n.ace-dracula .ace_comment {\n color: #6272a4\n}\n\n.ace-dracula .ace_variable {\n color: #50fa7b\n}\n\n.ace-dracula .ace_variable.ace_parameter {\n font-style: italic;\n color: #ffb86c\n}\n\n.ace-dracula .ace_entity.ace_other.ace_attribute-name {\n color: #50fa7b\n}\n\n.ace-dracula .ace_entity.ace_name.ace_function {\n color: #50fa7b\n}\n\n.ace-dracula .ace_entity.ace_name.ace_tag {\n color: #ff79c6\n}\n.ace-dracula .ace_invisible {\n color: #626680;\n}\n\n.ace-dracula .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-dracula .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACAQMAAACjTyRkAAAABlBMVEUAAADCwsK76u2xAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjYGBoAAAAhACBGFbxzQAAAABJRU5ErkJggg==") right repeat-y;\n}\n'})),ace.define("ace/theme/dracula",["require","exports","module","ace/theme/dracula-css","ace/lib/dom"],(function(e,t,n){t.isDark=!0,t.cssClass="ace-dracula",t.cssText=e("./dracula-css"),t.$selectionColorConflict=!0,e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)})),ace.require(["ace/theme/dracula"],(function(t){e&&(e.exports=t)}))}({exports:{}}),function(e){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],(function(e,t,n){var i=e("./lib/dom"),o=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,a=e("./lib/lang"),s=e("./range").Range,l=e("./range_list").RangeList,c=e("./keyboard/hash_handler").HashHandler,u=e("./tokenizer").Tokenizer,d=e("./clipboard"),h={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){var i=e.session.getTextRange();return n?i.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):i},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return d.getText&&d.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||""},CURRENT_YEAR:p.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:p.bind(null,{year:"2-digit"}),CURRENT_MONTH:p.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:p.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:p.bind(null,{month:"short"}),CURRENT_DATE:p.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:p.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:p.bind(null,{weekday:"short"}),CURRENT_HOUR:p.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:p.bind(null,{minute:"2-digit"}),CURRENT_SECOND:p.bind(null,{second:"2-digit"})};function p(e){var t=(new Date).toLocaleString("en-us",e);return 1==t.length?"0"+t:t}h.SELECTED_TEXT=h.SELECTION;var m=function(){function e(){this.snippetMap={},this.snippetNameMap={},this.variables=h}return e.prototype.getTokenizer=function(){return e.$tokenizer||this.createTokenizer()},e.prototype.createTokenizer=function(){function t(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function n(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var i={regex:"/("+n("/")+"+)/",onMatch:function(e,t,n){var i=n[0];return i.fmtString=!0,i.guard=e.slice(1,-1),i.flag="",""},next:"formatString"};return e.$tokenizer=new u({start:[{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return("}"==i&&n.length||-1!="`$\\".indexOf(i))&&(e=i),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:t},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(e,n,i){var o=t(e.substr(1));return i.unshift(o[0]),o},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+n("\\|")+"*\\|",onMatch:function(e,t,n){var i=e.slice(1,-1).replace(/\\[,|\\]|,/g,(function(e){return 2==e.length?e[1]:"\0"})).split("\0").map((function(e){return{value:e}}));return n[0].choices=i,[i[0]]},next:"start"},i,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return"}"==i&&n.length||-1!="`$\\".indexOf(i)?e=i:"n"==i?e="\n":"t"==i?e="\t":-1!="ulULE".indexOf(i)&&(e={changeCase:i,local:i>"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){var i=n.shift();return i&&(i.flag=e.slice(1,-1)),this.next=i&&i.tabstopId?"start":"",[i||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var i={text:e.slice(2)};return n.unshift(i),[i]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){var i=n.shift();return this.next=i&&i.tabstopId?"start":"",[i||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){return n[0].formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},i,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){"+"==e[1]&&(n[0].ifEnd=n[0]),"?"==e[1]&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map((function(e){return e.value||e}))},e.prototype.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";if(t=t.replace(/^TM_/,""),!this.variables.hasOwnProperty(t))return"";var i=this.variables[t];return"function"==typeof i&&(i=this.variables[t](e,t,n)),null==i?"":i},e.prototype.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var i=t.flag||"",o=t.guard;o=new RegExp(o,i.replace(/[^gim]/g,""));var r="string"==typeof t.fmt?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,a=this,s=e.replace(o,(function(){var e=a.variables.__;a.variables.__=[].slice.call(arguments);for(var t=a.resolveVariables(r,n),i="E",o=0;o=0&&r.splice(a,1)}}e.content?o(e):Array.isArray(e)&&e.forEach(o)},e.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,n=[],i={},o=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=o.exec(e);){if(t[1])try{i=JSON.parse(t[1]),n.push(i)}catch(l){}if(t[4])i.content=t[4].replace(/^\t/gm,""),n.push(i),i={};else{var r=t[2],a=t[3];if("regex"==r){var s=/\/((?:[^\/\\]|\\.)*)|$/g;i.guard=s.exec(a)[1],i.trigger=s.exec(a)[1],i.endTrigger=s.exec(a)[1],i.endGuard=s.exec(a)[1]}else"snippet"==r?(i.tabTrigger=a.match(/^\S*/)[0],i.name||(i.name=a)):r&&(i[r]=a)}}return n},e.prototype.getSnippetByName=function(e,t){var n,i=this.snippetNameMap;return this.getActiveScopes(t).some((function(t){var o=i[t];return o&&(n=o[e]),!!n}),this),n},e}();o.implement(m.prototype,r);var f=function(e,t,n){void 0===n&&(n={});var i=e.getCursorPosition(),o=e.session.getLine(i.row),r=e.session.getTabString(),a=o.match(/^\s*/)[0];i.column1?(v=t[t.length-1].length,y+=t.length-1):v+=e.length,b+=e}else e&&(e.start?e.end={row:y,column:v}:e.start={row:y,column:v})})),{text:b,tabstops:l,tokens:s}},g=function(){function e(e){if(this.index=0,this.ranges=[],this.tabstops=[],e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=a.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return e.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.session=e.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},e.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},e.prototype.onChange=function(e){for(var t="r"==e.action[0],n=this.selectedTabstop||{},i=n.parents||{},o=this.tabstops.slice(),r=0;r2&&(this.tabstops.length&&r.push(r.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,r))},e.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach((function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))}))},e.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach((function(e){t.removeMarker(e.markerId),e.markerId=null}))},e.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var e=this.selectedTabstop.snippetId;0===this.selectedTabstop.index&&e--,this.tabstops.forEach((function(t){t.snippetId===e?this.addTabstopMarkers(t):this.removeTabstopMarkers(t)}),this)}},e.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);-1!=t&&e.tabstop.splice(t,1),-1!=(t=this.ranges.indexOf(e))&&this.ranges.splice(t,1),-1!=(t=e.tabstop.rangeList.ranges.indexOf(e))&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||(-1!=(t=this.tabstops.indexOf(e.tabstop))&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},e}();g.prototype.keyboardHandler=new c,g.prototype.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||(e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView())},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}});var y=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},v=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};i.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}","snippets.css",!1),t.snippetManager=new m;var b=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(b.prototype)})),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],(function(e,t,n){var i=e("../virtual_renderer").VirtualRenderer,o=e("../editor").Editor,r=e("../range").Range,a=e("../lib/event"),s=e("../lib/lang"),l=e("../lib/dom"),c=e("../config").nls,u=e("./../lib/useragent"),d=function(e){return"suggest-aria-id:".concat(e)},h=u.isSafari?"menu":"listbox",p=u.isSafari?"menuitem":"option",m=u.isSafari?"aria-current":"aria-selected",f=function(e){var t=new i(e);t.$maxLines=4;var n=new o(t);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusTimeout=0,n.$highlightTagPending=!0,n};l.importCssString('\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin-left: 0.9em;\n}\n.ace_completion-message {\n margin-left: 0.9em;\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: absolute;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n display: flex;\n align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n min-width: 0;\n flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n flex: 0 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n flex: 1;\n}\n.ace_autocomplete.ace_loading:after {\n content: "";\n position: absolute;\n top: 0px;\n height: 2px;\n width: 8%;\n background: blue;\n z-index: 100;\n animation: ace_progress 3s infinite linear;\n animation-delay: 300ms;\n transform: translateX(-100%) scaleX(1);\n}\n@keyframes ace_progress {\n 0% { transform: translateX(-100%) scaleX(1) }\n 50% { transform: translateX(625%) scaleX(2) } \n 100% { transform: translateX(1500%) scaleX(3) } \n}\n@media (prefers-reduced-motion) {\n .ace_autocomplete.ace_loading:after {\n transform: translateX(625%) scaleX(2);\n animation: none;\n }\n}\n',"autocompletion.css",!1),t.AcePopup=function(e){var t=l.createElement("div"),n=f(t);e&&e.appendChild(t),t.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.renderer.$textLayer.element.setAttribute("role",h),n.renderer.$textLayer.element.setAttribute("aria-roledescription",c("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),n.renderer.$textLayer.element.setAttribute("aria-label",c("autocomplete.popup.aria-label","Autocomplete suggestions")),n.renderer.textarea.setAttribute("aria-hidden","true"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150);var i,o=function(){};n.focus=o,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=o,n.renderer.$cursorLayer.element.style.opacity="0",n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",(function(e){var t=e.getDocumentPosition();n.selection.moveToPosition(t),g.start.row=g.end.row=t.row,e.stop()}));var u=new r(-1,0,-1,1/0),g=new r(-1,0,-1,1/0);g.id=n.session.addMarker(g,"ace_active-line","fullLine"),n.setSelectOnHover=function(e){e?u.id&&(n.session.removeMarker(u.id),u.id=null):u.id=n.session.addMarker(u,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",(function(e){if(i){if(i.x!=e.x||i.y!=e.y){(i=e).scrollTop=n.renderer.scrollTop,n.isMouseOver=!0;var t=i.getDocumentPosition().row;u.start.row!=t&&(u.id||n.setRow(t),v(t))}}else i=e})),n.renderer.on("beforeRender",(function(){if(i&&-1!=u.start.row){i.$pos=null;var e=i.getDocumentPosition().row;u.id||n.setRow(e),v(e,!0)}})),n.renderer.on("afterRender",(function(){for(var e=n.renderer.$textLayer,t=e.config.firstRow,i=e.config.lastRow;t<=i;t++){var o=e.element.childNodes[t-e.config.firstRow];o.setAttribute("role",p),o.setAttribute("aria-roledescription",c("autocomplete.popup.item.aria-roledescription","item")),o.setAttribute("aria-setsize",n.data.length),o.setAttribute("aria-describedby","doc-tooltip"),o.setAttribute("aria-posinset",t+1);var r=n.getData(t);if(r){var a="".concat(r.caption||r.value).concat(r.meta?", ".concat(r.meta):"");o.setAttribute("aria-label",a)}o.querySelectorAll(".ace_completion-highlight").forEach((function(e){e.setAttribute("role","mark")}))}})),n.renderer.on("afterRender",(function(){var e=n.getRow(),t=n.renderer.$textLayer,i=t.element.childNodes[e-t.config.firstRow],o=document.activeElement;if(i!==n.selectedNode&&n.selectedNode&&(l.removeCssClass(n.selectedNode,"ace_selected"),n.selectedNode.removeAttribute(m),n.selectedNode.removeAttribute("id")),o.removeAttribute("aria-activedescendant"),n.selectedNode=i,i){var r=d(e);l.addCssClass(i,"ace_selected"),i.id=r,t.element.setAttribute("aria-activedescendant",r),o.setAttribute("aria-activedescendant",r),i.setAttribute(m,"true")}}));var y=function(){v(-1)},v=function(e,t){e!==u.start.row&&(u.start.row=u.end.row=e,t||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return u.start.row},a.addListener(n.container,"mouseout",(function(){n.isMouseOver=!1,y()})),n.on("hide",y),n.on("changeSelection",y),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(e){var t=n.data[e];return"string"==typeof t?t:t&&t.value||""};var b=n.session.bgTokenizer;return b.$tokenizeRow=function(e){var t=n.data[e],i=[];if(!t)return i;"string"==typeof t&&(t={value:t});var o=t.caption||t.value||t.name;function r(e,n){e&&i.push({type:(t.className||"")+(n||""),value:e})}for(var a=o.toLowerCase(),s=(n.filterText||"").toLowerCase(),l=0,c=0,u=0;u<=s.length;u++)if(u!=c&&(t.matchMask&1<=d?"bottom":"top"),"top"===o?(h.bottom=e.top-this.$borderSize,h.top=h.bottom-d):"bottom"===o&&(h.top=e.top+t+this.$borderSize,h.bottom=h.top+d);var f=h.top>=0&&h.bottom<=l;if(!r&&!f)return!1;u.$maxPixelHeight=f?null:"top"===o?m:p,a.style.display="";var g=a.offsetParent&&a.offsetParent.getBoundingClientRect();"top"===o?(a.style.top="",a.style.bottom=l+s-h.bottom-(g?l+s-g.bottom:0)+"px",n.isTopdown=!1):(a.style.top=h.top-(g?g.top:0)+"px",a.style.bottom="",n.isTopdown=!0);var y=e.left;return y+a.offsetWidth>c&&(y=c-a.offsetWidth),a.style.left=y-(g?g.left:0)+"px",a.style.right="",n.isOpen||(n.isOpen=!0,this._signal("show"),i=null),n.anchorPos=e,n.anchor=o,!0},n.show=function(e,t,n){this.tryShow(e,t,n?"bottom":void 0,!0)},n.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.setRow(t)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n},t.$singleLineEditor=f,t.getAriaId=d})),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],(function(e,t,n){var i=function(){function e(e){this.editor=e,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return e.prototype.setScreenReaderContent=function(e){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var e=this.popup.getRow(),t=this.popup.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];if(n){for(var i="doc-tooltip ",o=0;o=0&&n.test(e[r]);r--)o.push(e[r]);return o.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||i;for(var o=[],r=t;r0)for(var t=this.popup.getFirstVisibleRow();t<=this.popup.getLastVisibleRow();t++){var n=this.popup.getData(t);!n||e&&!n.hideInlinePreview||this.$seen(n)}},e.prototype.$onPopupShow=function(e){this.$onPopupChange(e),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},e.prototype.observeLayoutChanges=function(){if(!this.$elements&&this.editor){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var e=this.editor.container.parentNode,t=[];e;)t.push(e),e.addEventListener("scroll",this.onLayoutChange,{passive:!0}),e=e.parentNode;this.$elements=t}},e.prototype.unObserveLayoutChanges=function(){var e=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach((function(t){t.removeEventListener("scroll",e.onLayoutChange,{passive:!0})})),this.$elements=null},e.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},e.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,n=t.layerConfig.lineHeight,i=t.$cursorLayer.getPixelPosition(this.base,!0);i.left-=this.popup.getTextLeftOffset();var o=e.container.getBoundingClientRect();i.top+=o.top-t.layerConfig.offset,i.left+=o.left-e.renderer.scrollLeft,i.left+=t.gutterWidth;var r={top:i.top,left:i.left};t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(r.top+=t.$ghostTextWidget.el.offsetHeight);var a=e.container.getBoundingClientRect().bottom-n,s=athis.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else t=this.all;this.filterText=e,t=(t=this.filterCompletions(t,this.filterText)).sort((function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)}));var n=null;t=t.filter((function(e){var t=e.snippet||e.caption||e.value;return t!==n&&(n=t,!0)})),this.filtered=t},e.prototype.filterCompletions=function(e,t){var n=[],i=t.toUpperCase(),o=t.toLowerCase();e:for(var r,a=0;r=e[a];a++)if(r.skipFilter)r.$score=r.score,n.push(r);else{var s=!this.ignoreCaption&&r.caption||r.value||r.snippet;if(s){var l,c,u=-1,d=0,h=0;if(this.exactMatch){if(t!==s.substr(0,t.length))continue e}else{var p=s.toLowerCase().indexOf(o);if(p>-1)h=p;else for(var m=0;m=0&&(g<0||f0&&(-1===u&&(h+=10),h+=c,d|=1<a||(u.range.start.row===l?s++:(l=u.range.start.row,s=0),s>200))){var d=u.range.clipRows(r,a);if(d.start.row!==d.end.row||d.start.column!==d.end.column){var h=d.toScreenRange(n);h.isEmpty()?(o=n.getNextFoldLine(d.end.row,o))&&o.end.row>d.end.row&&(r=o.end.row):"fullLine"===this.markerType?t.drawFullLineMarker(e,h,u.className,i):h.isMultiLine()?"line"===this.markerType?t.drawMultiLineMarker(e,h,u.className,i):t.drawTextMarker(e,h,u.className,i):t.drawSingleLineMarker(e,h,u.className+" ace_br15",i)}}}},e}();i.prototype.MAX_MARKERS=1e4,t.MarkerGroup=i})),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],(function(e,t,n){var i=e("../range").Range,o=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;t.getCompletions=function(e,t,n,r,a){var s=function(e,t){var n=function(e,t){return e.getTextRange(i.fromPoints({row:0,column:0},t)).split(o).length-1}(e,t),r=e.getValue().split(o),a=Object.create(null),s=r[n];return r.forEach((function(e,t){if(e&&e!==s){var i=Math.abs(n-t),o=r.length-i;a[e]?a[e]=Math.max(o,a[e]):a[e]=o}})),a}(t,n);a(null,Object.keys(s).map((function(e){return{caption:e,value:e,score:s[e],meta:"local"}})))}})),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],(function(e,t,n){var i=e("../snippets").snippetManager,o=e("../autocomplete").Autocomplete,r=e("../config"),a=e("../lib/lang"),s=e("../autocomplete/util"),l=e("../marker_group").MarkerGroup,c=e("../autocomplete/text_completer"),u={getCompletions:function(e,t,n,i,o){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,n,i,o);var r=e.session.getState(n.row),a=t.$mode.getCompletions(r,t,n,i);o(null,a=a.map((function(e){return e.completerId=u.id,e})))},id:"keywordCompleter"},d={getCompletions:function(e,t,n,o,r){var a=[],s=t.getTokenAt(n.row,n.column);s&&s.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?a.push("html-tag"):a=i.getActiveScopes(e);var l=i.snippetMap,c=[];a.forEach((function(e){for(var t=l[e]||[],n=t.length;n--;){var i=t[n],o=i.name||i.tabTrigger;o&&c.push({caption:o,snippet:i.content,meta:i.tabTrigger&&!i.name?i.tabTrigger+"⇥ ":"snippet",completerId:d.id})}}),this),r(null,c)},getDocTooltip:function(e){var t,n;e.snippet&&!e.docHTML&&(e.docHTML=["",a.escapeHTML(e.caption),"","
",a.escapeHTML((t=e.snippet,n={},t.replace(/\${(\d+)(:(.*?))?}/g,(function(e,t,i,o){return n[t]=o||""})).replace(/\$(\d+?)/g,(function(e,t){return n[t]}))))].join(""))},id:"snippetCompleter"},h=[d,c,u];t.setCompleters=function(e){h.length=0,e&&h.push.apply(h,e)},t.addCompleter=function(e){h.push(e)},t.textCompleter=c,t.keyWordCompleter=u,t.snippetCompleter=d;var p,m={name:"expandSnippet",exec:function(e){return i.expandWithTab(e)},bindKey:"Tab"},f=function(e,t){g(t.session.$mode)},g=function(e){"string"==typeof e&&(e=r.$modes[e]),e&&(i.files||(i.files={}),y(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(g))},y=function(e,t){t&&e&&!i.files[e]&&(i.files[e]={},r.loadModule(t,(function(t){t&&(i.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=i.parseSnippetFile(t.snippetText)),i.register(t.snippets||[],t.scope),t.includeScopes&&(i.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach((function(e){g("ace/mode/"+e)}))))})))},v=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if("backspace"===e.command.name)n&&!s.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name&&!n){p=e;var i=e.editor.$liveAutocompletionDelay;i?b.delay(i):w(e)}},b=a.delayedCall((function(){w(p)}),0),w=function(e){var t=e.editor,n=s.getCompletionPrefix(t),i=e.args,r=s.triggerAutocomplete(t,i);if(n&&n.length>=t.$liveAutocompletionThreshold||r){var a=o.for(t);a.autoShown=!0,a.showPopup(t)}},x=e("../editor").Editor;e("../config").defineOptions(x.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(o.for(this),this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.addCommand(o.startCommand)):this.commands.removeCommand(o.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.on("afterExec",v)):this.commands.off("afterExec",v)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(m),this.on("changeMode",f),f(0,this)):(this.commands.removeCommand(m),this.off("changeMode",f))},value:!1}}),t.MarkerGroup=l})),ace.require(["ace/ext/language_tools"],(function(t){e&&(e.exports=t)}))}({exports:{}}),function(e){ace.define("ace/ext/rtl",["require","exports","module","ace/editor","ace/config"],(function(e,t,n){var i=[{name:"leftToRight",bindKey:{win:"Ctrl-Alt-Shift-L",mac:"Command-Alt-Shift-L"},exec:function(e){e.session.$bidiHandler.setRtlDirection(e,!1)},readOnly:!0},{name:"rightToLeft",bindKey:{win:"Ctrl-Alt-Shift-R",mac:"Command-Alt-Shift-R"},exec:function(e){e.session.$bidiHandler.setRtlDirection(e,!0)},readOnly:!0}],o=e("../editor").Editor;function r(e,t){var n=t.getSelection().lead;t.session.$bidiHandler.isRtlLine(n.row)&&0===n.column&&(t.session.$bidiHandler.isMoveLeftOperation&&n.row>0?t.getSelection().moveCursorTo(n.row-1,t.session.getLine(n.row-1).length):t.getSelection().isEmpty()?n.column+=1:n.setPosition(n.row,n.column+1))}function a(e){e.editor.session.$bidiHandler.isMoveLeftOperation=/gotoleft|selectleft|backspace|removewordleft/.test(e.command.name)}function s(e,t){var n=t.session;if(n.$bidiHandler.currentRow=null,n.$bidiHandler.isRtlLine(e.start.row)&&"insert"===e.action&&e.lines.length>1)for(var i=e.start.row;i999))&&(l[0]||(t.lastIndex=u+=o.skipEmptyMatch(a,u,n),!(u>=a.length))););}this.searchCounter.textContent=c("search-box.search-counter","$0 of $1",[r,i>999?"999+":i])},e.prototype.findNext=function(){this.find(!0,!1)},e.prototype.findPrev=function(){this.find(!0,!0)},e.prototype.findAll=function(){var e=!this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked})&&this.searchInput.value;i.setCssClass(this.searchBox,"ace_nomatch",e),this.editor._emit("findSearchBox",{match:!e}),this.highlight(),this.hide()},e.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},e.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},e.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},e.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.editor.off("input",this.$onEditorInput),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},e.prototype.show=function(e,t){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=t,this.editor.$search.$options.regExp&&(e=o.escapeRegExp(e)),null!=e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},e.prototype.isFocused=function(){var e=document.activeElement;return e==this.searchInput||e==this.replaceInput},e}(),d=new s;d.bindKeys({"Ctrl-f|Command-f":function(e){var t=e.isReplace=!e.isReplace;e.replaceBox.style.display=t?"":"none",e.replaceOption.checked=!1,e.$syncOptions(),e.searchInput.focus()},"Ctrl-H|Command-Option-F":function(e){e.editor.getReadOnly()||(e.replaceOption.checked=!0,e.$syncOptions(),e.replaceInput.focus())},"Ctrl-G|Command-G":function(e){e.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(e){e.findPrev()},esc:function(e){setTimeout((function(){e.hide()}))},Return:function(e){e.activeInput==e.replaceInput&&e.replace(),e.findNext()},"Shift-Return":function(e){e.activeInput==e.replaceInput&&e.replace(),e.findPrev()},"Alt-Return":function(e){e.activeInput==e.replaceInput&&e.replaceAll(),e.findAll()},Tab:function(e){(e.activeInput==e.replaceInput?e.searchInput:e.replaceInput).focus()}}),d.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(e){e.regExpOption.checked=!e.regExpOption.checked,e.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(e){e.caseSensitiveOption.checked=!e.caseSensitiveOption.checked,e.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(e){e.wholeWordOption.checked=!e.wholeWordOption.checked,e.$syncOptions()}},{name:"toggleReplace",exec:function(e){e.replaceOption.checked=!e.replaceOption.checked,e.$syncOptions()}},{name:"searchInSelection",exec:function(e){e.searchOption.checked=!e.searchRange,e.setSearchRange(e.searchOption.checked&&e.editor.getSelectionRange()),e.$syncOptions()}}]);var h=new s([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]);u.prototype.$searchBarKb=d,u.prototype.$closeSearchBarKb=h,t.SearchBox=u,t.Search=function(e,t){var n=e.searchBox||new u(e),i=e.session.selection.getRange(),o=i.isMultiLine()?"":e.session.getTextRange(i);n.show(o,t)}})),ace.require(["ace/ext/searchbox"],(function(t){e&&(e.exports=t)}))}({exports:{}}),function(e){ace.define("ace/ext/beautify",["require","exports","module","ace/token_iterator"],(function(e,t,n){var i=e("../token_iterator").TokenIterator;function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}t.singletonTags=["area","base","br","col","command","embed","hr","html","img","input","keygen","link","meta","param","source","track","wbr"],t.blockTags=["article","aside","blockquote","body","div","dl","fieldset","footer","form","head","header","html","nav","ol","p","script","section","style","table","tbody","tfoot","thead","ul"],t.formatOptions={lineBreaksAfterCommasInCurlyBlock:!0},t.beautify=function(e){for(var n,r,a,s=new i(e,0,0),l=s.getCurrentToken(),c=e.getTabString(),u=t.singletonTags,d=t.blockTags,h=t.formatOptions||{},p=!1,m=!1,f=!1,g="",y="",v="",b=0,w=0,x=0,C=0,_=0,S=0,k=0,E=0,$=0,M=!1,R=!1,A=!1,O=!1,j={0:0},T=[],N=!1,L=function(){n&&n.value&&"string.regexp"!==n.type&&(n.value=n.value.replace(/^\s*/,""))},I=function(){for(var e=g.length-1;0!=e&&" "===g[e];)e-=1;g=g.slice(0,e+1)},D=function(){g=g.trimRight(),p=!1};null!==l;){if(E=s.getCurrentTokenRow(),s.$rowTokens,n=s.stepForward(),void 0!==l){if(y=l.value,_=0,A="style"===v||"ace/mode/css"===e.$modeId,o(l,"tag-open")?(R=!0,n&&(O=-1!==d.indexOf(n.value)),"0;$--)g+="\n";p=!0,o(l,"comment")||l.type.match(/^(comment|string)$/)||(y=y.trimLeft())}if(y){if("keyword"===l.type&&y.match(/^(if|else|elseif|for|foreach|while|switch)$/)?(T[b]=y,L(),f=!0,y.match(/^(else|elseif)$/)&&g.match(/\}[\s]*$/)&&(D(),m=!0)):"paren.lparen"===l.type?(L(),"{"===y.substr(-1)&&(f=!0,M=!1,R||($=1)),"{"===y.substr(0,1)&&(m=!0,"["!==g.substr(-1)&&"["===g.trimRight().substr(-1)?(D(),m=!1):")"===g.trimRight().substr(-1)?D():I())):"paren.rparen"===l.type?(_=1,"}"===y.substr(0,1)&&("case"===T[b-1]&&_++,"{"===g.trimRight().substr(-1)?D():(m=!0,A&&($+=2))),"]"===y.substr(0,1)&&"}"!==g.substr(-1)&&"}"===g.trimRight().substr(-1)&&(m=!1,C++,D()),")"===y.substr(0,1)&&"("!==g.substr(-1)&&"("===g.trimRight().substr(-1)&&(m=!1,C++,D()),I()):"keyword.operator"!==l.type&&"keyword"!==l.type||!y.match(/^(=|==|===|!=|!==|&&|\|\||and|or|xor|\+=|.=|>|>=|<|<=|=>)$/)?"punctuation.operator"===l.type&&";"===y?(D(),L(),f=!0,A&&$++):"punctuation.operator"===l.type&&y.match(/^(:|,)$/)?(D(),L(),y.match(/^(,)$/)&&k>0&&0===S&&h.lineBreaksAfterCommasInCurlyBlock?$++:(f=!0,p=!1)):"support.php_tag"!==l.type||"?>"!==y||p?o(l,"attribute-name")&&g.substr(-1).match(/^\s$/)?m=!0:o(l,"attribute-equals")?(I(),L()):o(l,"tag-close")?(I(),"/>"===y&&(m=!0)):"keyword"===l.type&&y.match(/^(case|default)$/)&&N&&(_=1):(D(),m=!0):(D(),L(),m=!0,f=!0),p&&(!l.type.match(/^(comment)$/)||y.substr(0,1).match(/^[/#]$/))&&(!l.type.match(/^(string)$/)||y.substr(0,1).match(/^['"@]$/))){if(C=x,b>w)for(C++,a=b;a>w;a--)j[a]=C;else b"===y)&&($=O&&n&&""===y&&b--),o(l,"tag-name")&&(v=y),r=E}}l=n}g=g.trim(),e.doc.setValue(g)},t.commands=[{name:"beautify",description:"Format selection (Beautify)",exec:function(e){t.beautify(e.session)},bindKey:"Ctrl-Shift-B"}]})),ace.require(["ace/ext/beautify"],(function(t){e&&(e.exports=t)}))}({exports:{}});const $Q=window.React.useCallback,MQ=window.React.useMemo,RQ=window.React.useState,AQ=e=>{const t=MQ((()=>!(!e.value||function(e){return"string"==typeof e}(e.value)&&e.checkedValue!==e.value)),[e.value,e.checkedValue,e.uncheckedValue]),n=$Q((t=>{const n=t?!qE(e.checkedValue)||e.checkedValue:!!qE(e.uncheckedValue)&&e.uncheckedValue;e.updateDataCallback({[e.attribute]:n})}),[e.updateDataCallback]);return Mn.jsxs("div",{className:"yaymail-general-setting-item horizontal",children:[Mn.jsxs("div",{className:"yaymail-general-setting-item__title",children:[Mn.jsx("span",{children:e.label}),e.note&&Mn.jsx("span",{className:"yaymail-general-setting-item__note",children:e.note})]}),Mn.jsx(ww,{checkedChildren:Mn.jsx("span",{className:"yaymail-setting-switch-label",children:qE(e.checkedValue)?e.checkedValue:"on"}),checked:t,onChange:n,unCheckedChildren:Mn.jsx("span",{className:"yaymail-setting-switch-label",children:qE(e.uncheckedValue)?e.uncheckedValue:"off"}),disabled:e.disabled})]})},OQ=window.yaymailData.urls.home_url+"/wp-admin/admin.php?page=wc-settings&tab=email",jQ=()=>{const e=fO(),t=h_(),n=new URLSearchParams(t.search).get("template"),i=cE((e=>e.updateSettings)),{saveSettingsMutation:o}=iA({fetch:!1}),r=cE((e=>e.settings)),a=MQ((()=>"yaymail_global_header_footer"===n),[n]),s=cE((e=>e.hasChanged)),l=cE((e=>e.updateSettingsStatus)),[c,u]=RQ(!1),d=e=>{i(e),l(!0)},[h,p]=sw.useNotification({maxCount:1}),m=(e,t)=>{h[e]({message:t,placement:"bottomRight",duration:3})},f=MQ((()=>r&&r.container_width&&!isNaN(r.container_width)?null==r?void 0:r.container_width:605),[r]),g=$Q((e=>{"number"==typeof e&&d({container_width:e})}),[d]),y=$Q((e=>{d({payment_display_mode:e})}),[d]),v=$Q((e=>{d({product_image_position:e})}),[d]),b=$Q((e=>{"number"==typeof e&&d({product_image_height:e})}),[d]),w=$Q((e=>{"number"==typeof e&&d({product_image_width:e})}),[d]),x=$Q((e=>{qE(e)&&d({custom_css:e})}),[d]);return Mn.jsxs(Mn.Fragment,{children:[p,r&&Mn.jsxs("div",{className:"yaymail-general-setting",children:[Mn.jsx(AQ,{attribute:"direction",checkedValue:"rtl",label:__("Direction","yaymail"),value:e,uncheckedValue:"ltr",updateDataCallback:d}),!a&&Mn.jsx(AQ,{value:Boolean(r.global_header_footer_enabled??!1),attribute:"global_header_footer_enabled",updateDataCallback:d,label:__("Global header footer","yaymail")}),Mn.jsxs("div",{className:"yaymail-general-setting-item",children:[Mn.jsx("div",{className:"yaymail-general-setting-item__title",children:__("Container width (px)","yaymail")}),Mn.jsx(Jp,{className:"vertical-control",bordered:!1,min:480,max:900,defaultValue:605,value:f,onChange:g}),Mn.jsx("p",{className:"yaymail-general-setting-item__note",children:__("Email width must be 480px (min) - 900px (max)","yaymail")})]}),Mn.jsxs("div",{className:"yaymail-general-setting-item",children:[Mn.jsxs("div",{className:"yaymail-general-setting-item__disabled",style:{opacity:.5},children:[Mn.jsx("div",{className:"yaymail-general-setting-item__title",children:__("Display payment instruction and details","yaymail")}),Mn.jsx(Qt,{className:"vertical-control",defaultValue:"onlyForCustomer",value:r.payment_display_mode,onChange:y,popupClassName:"yaymail-sidebar-select-popup",disabled:!0,children:[{value:"yes",label:"Yes"},{value:"no",label:"No"},{value:"customer",label:"Only for customer"}].map((e=>Mn.jsx(Qt.Option,{value:e.value,label:e.label,children:Mn.jsxs("div",{className:"yaymail-sidebar-custom-select-option",children:[Mn.jsx("span",{children:e.label}),Mn.jsx(PL,{className:"check"})]})},e.value)))})]}),Mn.jsx("p",{className:"yaymail-general-setting-item__note",children:__("This setting is no longer global. To show payment instructions, please use [yaymail_payment_instructions] in any text area","yaymail")})]}),Mn.jsx(AQ,{value:Boolean(r.show_product_image),attribute:"show_product_image",updateDataCallback:d,label:__("Show product image","yaymail")}),Boolean(r.show_product_image)&&Mn.jsxs("div",{children:[Mn.jsxs("div",{className:"yaymail-general-setting-item",children:[Mn.jsx("div",{className:"yaymail-general-setting-item__title",children:__("Product image position","yaymail")}),Mn.jsx(Qt,{className:"vertical-control",defaultValue:"onlyForCustomer",value:r.product_image_position,onChange:v,popupClassName:"yaymail-sidebar-select-popup",children:[{value:"top",label:"Top"},{value:"left",label:"Left"},{value:"bottom",label:"Bottom"}].map((e=>Mn.jsx(Qt.Option,{value:e.value,label:e.label,children:Mn.jsxs("div",{className:"yaymail-sidebar-custom-select-option",children:[Mn.jsx("span",{children:e.label}),Mn.jsx(PL,{className:"check"})]})},e.value)))})]}),Mn.jsxs("div",{className:"yaymail-general-setting-item",children:[Mn.jsx("div",{className:"yaymail-general-setting-item__title",children:__("Product image height (px)","yaymail")}),Mn.jsx(Jp,{className:"vertical-control",bordered:!1,min:30,max:300,defaultValue:30,value:r.product_image_height,onChange:b}),Mn.jsx("p",{className:"yaymail-general-setting-item__note",children:__("Image height must be 30px (min) - 300px (max)","yaymail")})]}),Mn.jsxs("div",{className:"yaymail-general-setting-item",children:[Mn.jsx("div",{className:"yaymail-general-setting-item__title",children:__("Image width (px)","yaymail")}),Mn.jsx(Jp,{className:"vertical-control",bordered:!1,min:30,max:300,defaultValue:30,value:r.product_image_width,onChange:w}),Mn.jsx("p",{className:"yaymail-general-setting-item__note",children:__("Product image width must be 30px (min) - 300px (max)","yaymail")})]})]}),Mn.jsx(AQ,{value:Boolean(r.show_product_sku),attribute:"show_product_sku",updateDataCallback:d,label:__("Show product SKU","yaymail")}),Mn.jsx(AQ,{value:Boolean(r.show_product_description),attribute:"show_product_description",updateDataCallback:d,label:__("Show product short description","yaymail")}),Mn.jsx(AQ,{value:Boolean(r.show_product_hyper_links),attribute:"show_product_hyper_links",updateDataCallback:d,label:__("Show product Hyperlinks","yaymail")}),Mn.jsx(AQ,{value:Boolean(r.show_product_item_cost),attribute:"show_product_item_cost",updateDataCallback:d,label:__("Show product item cost","yaymail")}),Mn.jsx(AQ,{value:Boolean(r.show_product_regular_price),attribute:"show_product_regular_price",updateDataCallback:d,label:__("Show product regular price","yaymail")}),Mn.jsx(AQ,{value:Boolean(r.enable_custom_css),attribute:"enable_custom_css",updateDataCallback:d,label:__("Use custom CSS","yaymail")}),Boolean(r.enable_custom_css)&&Mn.jsx(EQ,{mode:"css",theme:"dracula",onChange:x,name:"yaymail-custom-css",height:"270px",width:"268px",enableLiveAutocompletion:!0,enableBasicAutocompletion:!0,enableMobileMenu:!0,tabSize:2,editorProps:{$blockScrolling:!0},className:"yaymail-custom-css-editor",showGutter:!0,showPrintMargin:!0,highlightActiveLine:!0,value:r.custom_css,setOptions:{useWorker:!1}}),Mn.jsxs("div",{className:"yaymail-general-setting-item",style:{marginBottom:0},children:[Mn.jsx("div",{className:"yaymail-general-setting-item__title",style:{textTransform:"initial"},children:__("Change email subject and form name","yaymail")}),Mn.jsx("a",{target:"_blank",href:OQ,style:{fontSize:12,fontWeight:500},rel:"noreferrer",className:"yaymail-link--light",children:__("Click here","yaymail")})]})]}),Mn.jsx("div",{className:"yaymail-btn-save-wrapper",children:Mn.jsx(Ct,{type:"primary",className:"yaymail-btn-save yaymail-btn--light",onClick:async()=>{u(!0),(await o.mutateAsync(r)).success?m("success",__("Save success","yaymail")):m("error",__("Save failed","yaymail")),u(!1)},disabled:!s,loading:c,icon:c?Mn.jsx(JI,{}):void 0,style:{minWidth:165},children:__(c?"Saving...":"Save global settings","yaymail")})})]})},TQ=[{key:"global",label:"Global",children:Mn.jsx(jQ,{})},{key:"emailSettings",label:Mn.jsxs(Mn.Fragment,{children:["Email Settings",Mn.jsx("p",{style:{marginBottom:2},className:"yaymail-general-setting-item__note",children:__("This will affect the current email settings","yaymail")})]}),children:Mn.jsx(Kq,{})}],NQ=()=>Mn.jsx("div",{className:"yaymail-customizer-tab-content yaymail-customizer-tab-setting",children:Mn.jsx(zU,{accordion:!0,items:TQ})}),LQ=window.React.createContext,IQ=window.React.useCallback,DQ=window.React.useMemo,HQ=window.React.useState,PQ=LQ(null),zQ=[{key:"elements",label:Mn.jsx("span",{className:"yaymail-tab-name",children:__("Elements","yaymail")}),children:Mn.jsx(cU,{children:Mn.jsx(YU,{})})},{key:"patterns",label:Mn.jsx("span",{className:"yaymail-tab-name",children:__("Patterns","yaymail")}),children:Mn.jsx(cU,{children:Mn.jsx(ZU,{})})},{key:"settings",label:Mn.jsx(he,{title:__("Settings","yaymail"),children:Mn.jsx(dD,{})}),children:Mn.jsx(cU,{children:Mn.jsx(NQ,{})})}],FQ=[{key:"actions",label:Mn.jsx("span",{className:"yaymail-tab-name",children:__("Actions","yaymail")}),children:Mn.jsx(cU,{children:Mn.jsx(DU,{})})},{key:"revisions",label:Mn.jsx("span",{className:"yaymail-tab-name",children:__("Revisions","yaymail")}),children:Mn.jsx(cU,{children:Mn.jsx(Zq,{})})},{key:"elements",label:Mn.jsx(he,{title:__("Elements"),children:Mn.jsx("svg",{style:{verticalAlign:"middle"},xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"currentColor",version:"1.1",id:"Capa_1",viewBox:"0 0 26.676 26.676",children:Mn.jsx("g",{children:Mn.jsx("path",{d:"M26.105,21.891c-0.229,0-0.439-0.131-0.529-0.346l0,0c-0.066-0.156-1.716-3.857-7.885-4.59 c-1.285-0.156-2.824-0.236-4.693-0.25v4.613c0,0.213-0.115,0.406-0.304,0.508c-0.188,0.098-0.413,0.084-0.588-0.033L0.254,13.815 C0.094,13.708,0,13.528,0,13.339c0-0.191,0.094-0.365,0.254-0.477l11.857-7.979c0.175-0.121,0.398-0.129,0.588-0.029 c0.19,0.102,0.303,0.295,0.303,0.502v4.293c2.578,0.336,13.674,2.33,13.674,11.674c0,0.271-0.191,0.508-0.459,0.562 C26.18,21.891,26.141,21.891,26.105,21.891z"})})})}),children:Mn.jsx(cU,{children:Mn.jsx(YU,{})})}],VQ=(e,t)=>Mn.jsx("div",{className:"yaymail-custom-tab-header",children:Mn.jsx(t,{...e})}),BQ=({onToggle:e})=>{const[t,n]=HQ(!1),i=()=>{n(!0)},o=eM((e=>{var t;return null==(t=e.chosenElement)?void 0:t.id})),r=eM((e=>e.unchooseElement)),a=eM((e=>e.specialEditorScreen)),s=eM((e=>e.deMultiSelect)),[l,c]=HQ(!0),[u,d]=HQ(zQ[0].key),h=DQ((()=>l?zQ:FQ),[l]),p=()=>{r(),d(FQ[0].key),c(!1)},[m,f]=HQ([]),g=iM(),y=IQ((()=>{r(),s(),g("/")}),[g]);return Mn.jsxs(Mn.Fragment,{children:[Mn.jsxs("section",{className:"yaymail-customizer-sidebar__header",children:[Mn.jsx("h5",{className:"yaymail-customizer-sidebar__title",children:__("WooCommerce Email Customizer","yaymail")}),Mn.jsx("div",{className:"yaymail-customizer-sidebar__button",children:Mn.jsx(Ct,{type:"primary",size:"small",onClick:i,icon:Mn.jsx(cI,{}),children:__("Go Pro","yaymail")})}),Mn.jsx("div",{className:"yaymail-customizer-sidebar__toggler",onClick:e,children:Mn.jsx(OL,{className:"yaymail-customizer-sidebar__toggler__icon"})})]}),a||o?Mn.jsx("section",{className:"yaymail-customizer-sidebar__editor-wrapper",children:a?Mn.jsx(LU,{}):Mn.jsx(jU,{})}):Mn.jsx("section",{className:"yaymail-customizer-sidebar__body",children:Mn.jsx(PQ.Provider,{value:{elementCollapseActiveKeys:m,setElementCollapseActiveKeys:f},children:Mn.jsx(bh,{activeKey:u,animated:!1,centered:!0,className:"yaymail-customizer-sidebar__main-tabs "+(l?"yaymail-customizer-sidebar__main-tabs__element":"yaymail-customizer-sidebar__main-tabs__history"),items:h,onChange:e=>{l||"elements"!==e||(r(),c(!0)),d(e)},renderTabBar:VQ,tabBarGutter:10,type:"card"})})}),Mn.jsxs("section",{className:"yaymail-customizer-sidebar__footer",children:[Mn.jsx("a",{onClick:y,children:Mn.jsxs("span",{className:"yaymail-customizer-sidebar__footer__btn-back",children:[Mn.jsx(bL,{className:"yaymail-customizer-sidebar__footer__icon-back"}),Mn.jsx("span",{children:__("Back to dashboard","yaymail")})]})}),l?Mn.jsx(he,{title:__("View History","yaymail"),children:Mn.jsx(Ct,{type:"primary",shape:"circle",onClick:p,size:"large",className:"yaymail-customizer-sidebar__footer__btn-history",children:Mn.jsx(kU,{style:{margin:"auto",display:"flex",alignItems:"center",width:"18px",height:"18px"}})})}):Mn.jsx(Ct,{type:"primary",shape:"circle",onClick:p,disabled:!0,size:"large",children:Mn.jsx(UI,{})})]}),Mn.jsx(dW,{}),Mn.jsx(SU,{}),Mn.jsx(sW,{isOpen:t,onOpen:i,onClose:()=>{n(!1)}})]})},WQ=window.React.useCallback,UQ=window.React.useContext,YQ=window.React.useState,ZQ=e=>{const[t,n]=YQ(!0),{isPageFetching:i}=UQ(bA),o=hM((e=>e.isPageLoading)),r=WQ((()=>{n((e=>!e))}),[]);return Mn.jsx(Sn,{style:{maxHeight:"100vh"},spinning:i||o,children:Mn.jsxs("main",{className:_$("yaymail-customizer-layout",e.classNames),children:[Mn.jsx("aside",{className:"yaymail-customizer-sidebar "+(t?"":"close"),children:Mn.jsx(BQ,{onToggle:r})}),Mn.jsx("section",{className:"yaymail-customizer-main",children:e.children})]})})},GQ=window.React.useEffect,qQ=()=>{GQ((()=>{const e=window.jQuery("html.wp-toolbar");return null==e||e.addClass("hidden-wp-admin-menu"),()=>{null==e||e.removeClass("hidden-wp-admin-menu")}}),[])},KQ=window.React.useEffect,QQ=()=>{const e=eM((e=>e.changeContentStatus));KQ((()=>{const t=eM.subscribe((e=>e.list),((t,n)=>{oK(t,n)||e(!0)}));return()=>{t()}}),[])},XQ=()=>(qQ(),QQ(),Mn.jsx(mA,{children:Mn.jsx(wA,{children:Mn.jsx("main",{className:"yaymail-email-customizer",children:Mn.jsx(ZQ,{children:Mn.jsx(tW,{})})})})}));function JQ({title:e="Default Title",sectionId:t=null,className:n="",children:i}){return Mn.jsxs("section",{className:_$("yaymail-dashboard__content",n),"data-section-id":t,children:[Mn.jsx("div",{style:{display:"flex"},children:Mn.jsx("h3",{children:e})}),i]})}const eX=(e,t)=>({filterDropdown:({setSelectedKeys:e,selectedKeys:n,confirm:i,clearFilters:o,close:r})=>Mn.jsx("div",{onKeyDown:e=>e.stopPropagation(),className:"yaymail-templates-filter-wrapper",children:Mn.jsx(bb,{ref:t,placeholder:__("Search template name","yaymail"),value:n[0],onChange:t=>{e(t.target.value?[t.target.value]:[]),i({closeDropdown:!1})},allowClear:!0,onPressEnter:()=>i(),className:"yaymail-templates-filter-search"})}),filterIcon:()=>Mn.jsx(sD,{style:{fontSize:15}}),onFilter:(t,n)=>{var i;return Boolean(null==(i=null==n?void 0:n[e])?void 0:i.toString().toLowerCase().includes(t.toLowerCase()))},render:e=>e}),tX=window.React.useCallback,nX=window.React.useMemo,iX=window.React.useRef,oX=window.React.useState,rX=({loading:e=!1})=>{const t=nX((()=>__(e?"Loading data":"No template found","yaymail")),[e]);return Mn.jsx(kn,{description:t})},aX=()=>{const[e,t]=sw.useNotification({maxCount:1}),{isFetching:n,changeStatusesMutation:i,resetTemplatesMutation:o}=sA(!0),r=hM((e=>e.templates)),a=m_(),s=(t,n)=>{e[t]({message:n,placement:"bottomRight",duration:3})},[l,c]=oX([]),u=tX((e=>async()=>{if(!(l.length<=0))if(1==(await i.mutateAsync({list_id:l,status:e})).success){const t=l.length>1;s("success",`${__("Template","yaymail")}${t?"s":""} ${__(t?"are":"is","yaymail")} ${__("active"===e?"enabled":"disabled","yaymail")}`)}else s("error","Change status failed")}),[l]),d=tX((async()=>{if(!(l.length<=0))if(1==(await o.mutateAsync(l)).success){const e=l.length>1;s("success",`${__("Template","yaymail")}${e?"s":""} ${__("reseted","yaymail")}`)}else s("error","Reset failed")}),[l]),h=tX((e=>{const t=e.id,n=new Set(l);n.has(t)?n.delete(t):n.add(t),c(Array.from(n))}),[l]),p={selectedRowKeys:l,onChange:e=>{c(e)},selections:[{key:"activate",text:__("Activate Templates","yaymail"),onSelect:u("active")},{key:"deactivate",text:__("Deactivate Templates","yaymail"),onSelect:u("inactive")},{key:"reset",text:__("Reset Templates","yaymail"),onSelect:d}],onCell:e=>({onClick:t=>{t.stopPropagation(),h(e)}})},m=nX((()=>n||i.isLoading||o.isLoading),[n,i.isLoading,o.isLoading]),f=tX((()=>{l.length!==r.length?c(r.map((e=>e.id))):c([])}),[l]),g=iX(null),y=[{key:"template_title",title:__("Template Name","yaymail"),dataIndex:"template_title",width:"25%",filterSearch:!0,onFilter:(e,t)=>t.name.startsWith(e),...eX("template_title",g)},{key:"status",title:__("Status","yaymail"),dataIndex:"status",width:"10%",render:(e,{status:t})=>Mn.jsx(Ka,{color:"active"===t?"#c8ffdc":"#e8e8e8",count:__("active"===t?"Active":"Inactive","yaymail"),style:{color:"rgba(0, 0, 0, 0.65)"}}),sorter:(e,t)=>e.status.length-t.status.length},{key:"recipient",title:__("Recipient(s)","yaymail"),dataIndex:"recipient",width:"10%"},{key:"source",title:__("Source","yaymail"),dataIndex:"source",responsive:["lg"]},{key:"last_updated",title:__("Last Updated","yaymail"),dataIndex:"last_updated",responsive:["md"],sorter:(e,t)=>new Date(e.last_updated).valueOf()-new Date(t.last_updated).valueOf()}];return Mn.jsxs(Mn.Fragment,{children:[t,Mn.jsx($n,{id:"yaymail-template-table",loading:m,bordered:!1,rowKey:"id",rowSelection:p,columns:y,dataSource:r??[],pagination:!1,style:{cursor:"pointer",fontSize:14},onHeaderRow:()=>({onClick:e=>{e.target.querySelector(".yaymail-checkbox-wrapper")&&f()}}),onRow:e=>({onClick:()=>{(e=>{a(`/customizer/?template=${e.name}`)})(e)}}),locale:{emptyText:Mn.jsx(rX,{loading:n})}})]})};function sX(){return Mn.jsx(aX,{})}const lX=()=>Mn.jsx(JQ,{title:__("Email Templates","yaymail"),className:"yaymail-email-templates",children:Mn.jsx(sX,{})}),cX=window.React.useCallback,uX=window.React.useEffect,dX=window.React.useMemo,hX=window.React.useState;function pX(){const e=hM((e=>e.isPageLoading)),t=hM((e=>e.isTourMode)),n=hM((e=>e.setTourMode)),[i,o]=hX(0),r=dX((()=>[{title:__("Welcome to Global Header and Footer Guidance","yaymail"),description:__("Design once, apply everywhere! Save time by setting up a global header and footer for all your emails.","yaymail"),target:null,nextButtonProps:{children:__("Let's start","yaymail")}},{title:__("Open the Editor","yaymail"),description:__("Here, you can access the Global Header & Footer editor. You'll see two sections: one for the header and one for the footer.","yaymail"),target:()=>document.querySelector('.yaymail-template-yaymail_global_header_footer [data-yaymail-element-type="heading"]')??null,nextButtonProps:{children:__("View footer section","yaymail")}},{title:__("Footer section","yaymail"),description:__("Here, you can add your footer content.","yaymail"),target:()=>document.querySelector('.yaymail-template-yaymail_global_header_footer [data-yaymail-element-type="footer"]')??null,nextButtonProps:{children:__("Next","yaymail")}},{title:__("Design Your Header","yaymail"),description:__("Drag elements from the left panel into the ‘Header’ area. Add logos, menus, text, or social icons.","yaymail"),target:()=>document.querySelector(".yaymail-customizer-tab-elements")??null},{title:__("Design Your Footer","yaymail"),description:__("Now do the same for the Footer area. Include company info, phone number, shop links, or anything else you need.","yaymail"),target:null},{title:__("Save and Apply Globally","yaymail"),description:__("Click ‘Save’ to keep your designs as the ‘Global Header’ and ‘Global Footer’. You can then add them to any email template later.","yaymail"),target:null},{title:__("Turn on the Global Header and Footer","yaymail"),description:__("Enable to make your Global Header and Footer visible in all email templates.","yaymail"),target:()=>document.querySelector("#yaymail-global-header-footer-toggle")??null},{title:__("All set! Your Global Header & Footer are live.","yaymail"),description:__("They now inject automatically into every email template—no dragging required. Open any template to preview or start creating your next email.","yaymail"),target:null,nextButtonProps:{children:__("Got it!","yaymail")},cover:Mn.jsx("img",{alt:"tour-mockup",src:window.yaymailData.urls.asset_url+"tour-mockup.png"}),placement:"bottom"}]),[e,i]);uX((()=>{t&&o(0)}),[t]);const a=dX((()=>{var e;return null===(null==(e=(r??[])[i])?void 0:e.target)}),[i,r]),s=cX((()=>{const e="second_move";window.yaymailData.ghf_tour=e,hE(e),n(!1)}),[hE,n]);return e?null:Mn.jsx(ex,{steps:r,open:t,onClose:s,current:i,onChange:e=>{if(3===e)return eM.getState().unchooseElement(),void setTimeout((()=>{o(e)}),100);o(e)},scrollIntoViewOptions:{behavior:"smooth",block:"center",inline:"center"},rootClassName:_$([a?"yaymail-tour-mask--masking":"",i===(r??[]).length-1?"yaymail-tour--with-cover":""]),onFinish:s,indicatorsRender:(e,t)=>Mn.jsxs("span",{children:[e+1," / ",t]})})}const mX=window.React.useCallback,fX=window.React.useEffect,gX=()=>{qQ(),QQ();const e=hM((e=>e.setGlobalHeaderFooter)),t=eM((e=>e.setSpecialEditorScreen)),n=mX((t=>{const n=t.template_elements,i=n.findIndex((e=>"skeleton_divider"===e.type));if(i<0)return;const o=n.slice(0,i),r=n.slice(i+1);window.yaymailData.builder.global_headers_footers.global_header_elements=o,window.yaymailData.builder.global_headers_footers.global_footer_elements=r,e({globalHeaderElements:o,globalFooterElements:r})}),[]);return fX((()=>{t(null)}),[]),Mn.jsxs(wA,{hasTemplateSelector:!1,hasOrderSelector:!1,hasTemplateImporter:!1,hasActivationButton:!1,hasSendTestMailButton:!1,templateId:"yaymail_global_header_footer",onSaveSuccess:n,children:[Mn.jsx("main",{className:"yaymail-email-customizer",children:Mn.jsx(ZQ,{children:Mn.jsx(tW,{})})}),Mn.jsx(pX,{})]})},yX=window.React.useEffect,vX=window.React.useState,bX=[{title:__("General Features","yaymail"),id:"general-features",items:[{title:__("11 standard WooCommerce emails","yaymail"),upgrade:!1},{title:__("Full customizability","yaymail"),upgrade:!1},{title:__("Global styling options","yaymail"),upgrade:!1},{title:__("Live preview editor","yaymail"),upgrade:!1},{title:__("Send test emails","yaymail"),upgrade:!1},{title:__("Export/Import templates","yaymail"),upgrade:!1},{title:__("Shortcode for WooCommerce data","yaymail"),upgrade:!1},{title:__("Predesigned patterns","yaymail"),upgrade:!1},{title:__("Developer API","yaymail"),upgrade:!1},{title:__("Synced patterns","yaymail"),upgrade:!0},{title:__("Global colors","yaymail"),upgrade:!0},{title:__("Email attachments","yaymail"),upgrade:!0},{title:__("Advanced blocks with dynamic data","yaymail"),upgrade:!0},{title:__("Full edit history","yaymail"),upgrade:!0},{title:__("Fast updates & bug fixes","yaymail"),upgrade:!0},{title:__("1-1 live chat VIP support","yaymail"),upgrade:!0}]},{title:Mn.jsxs("span",{style:{display:"flex",alignItems:"center",gap:5},children:[Mn.jsx("span",{children:__("Third-Party Plugins Supported","yaymail")}),Mn.jsx("a",{href:"https://docs.yaycommerce.com/yaymail/integrations",target:"_blank",rel:"noopener noreferrer",children:Mn.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Mn.jsxs("g",{clipPath:"url(#clip0_4418_9119)",children:[Mn.jsx("path",{d:"M3.27 12C2.48 11.05 2 9.83 2 8.5C2 5.48 4.47 3 7.5 3H12.5C15.52 3 18 5.48 18 8.5C18 11.52 15.53 14 12.5 14H10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),Mn.jsx("path",{d:"M20.73 12C21.52 12.95 22 14.17 22 15.5C22 18.52 19.53 21 16.5 21H11.5C8.48 21 6 18.52 6 15.5C6 12.48 8.47 10 11.5 10H14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),Mn.jsx("defs",{children:Mn.jsx("clipPath",{id:"clip0_4418_9119",children:Mn.jsx("rect",{width:"24",height:"24",fill:"none"})})})]})})]}),id:"third-party-integrations",items:[{title:__("Shipment & order tracking","yaymail"),upgrade:!0},{title:__("Custom order status","yaymail"),upgrade:!0},{title:__("Checkout field editor","yaymail"),upgrade:!0},{title:__("Payments & payment gateways","yaymail"),upgrade:!0},{title:__("Custom shipping plugins","yaymail"),upgrade:!0},{title:__("Multi-language & translation plugins","yaymail"),upgrade:!0}]},{title:__("Multi Language","yaymail"),id:"multi-language",items:[{title:__("WPML","yaymail"),upgrade:!0},{title:__("Polylang","yaymail"),upgrade:!0},{title:__("TranslatePress","yaymail"),upgrade:!0},{title:__("GTranslate","yaymail"),upgrade:!0},{title:__("Weglot","yaymail"),upgrade:!0},{title:__("Loco Translate","yaymail"),upgrade:!0}]}],wX=Mn.jsxs("svg",{width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Mn.jsx("circle",{cx:"11.5",cy:"11.5",r:"11",fill:"#FEF5DA"}),Mn.jsx("path",{d:"M6.5 12.5L9.22727 15.5L16.5 7.5",fill:"#FEF5DA"}),Mn.jsx("path",{d:"M6.5 12.5L9.22727 15.5L16.5 7.5",stroke:"#FEC900",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),xX=Mn.jsxs("svg",{width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Mn.jsx("path",{opacity:"0.5",d:"M11.5 22.5C17.5751 22.5 22.5 17.5751 22.5 11.5C22.5 5.42487 17.5751 0.5 11.5 0.5C5.42487 0.5 0.5 5.42487 0.5 11.5C0.5 17.5751 5.42487 22.5 11.5 22.5Z",fill:"#E8EAF0"}),Mn.jsx("path",{d:"M15.5 7.49976L7.5 15.4998",stroke:"#AAACBA",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"}),Mn.jsx("path",{d:"M7.5 7.49976L15.5 15.4998",stroke:"#AAACBA",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]});function CX(){const[e,t]=vX(0);return yX((()=>{if(!document.querySelector(".yaymail-header__navbar"))return;const e=window.jQuery(".yaymail-header__navbar").innerHeight()||0;t(e)}),[]),Mn.jsxs("div",{className:"yaymail-go-pro__comparison",children:[Mn.jsx("h2",{className:"yaymail-go-pro__comparison__title",children:__("Compare Plans & Features","yaymail")}),Mn.jsx("p",{className:"yaymail-go-pro__comparison__description",children:__("Explore our clear comparison table to see the features of each plan.","yaymail")}),Mn.jsxs("div",{className:"yaymail-go-pro__comparison__table-container",id:"comparison-table",children:[bX.map(((t,n)=>Mn.jsxs("div",{className:"yaymail-go-pro__comparison__table-group",style:n===bX.length-1?{marginBottom:0}:{},id:t.id,children:[Mn.jsxs("div",{className:"yaymail-go-pro__comparison__table-group-title yaymail-go-pro__comparison__table-item",style:{top:`calc( ${e}px + var(--yaymail-wp-adminBar-height-lg) + 20px )`},children:[Mn.jsx("div",{className:"yaymail-go-pro__comparison__table-item__name",children:t.title}),Mn.jsx("div",{className:"yaymail-go-pro__comparison__table-item__yaymail-free",children:__("YayMail Free","yaymail")}),Mn.jsx("div",{className:"yaymail-go-pro__comparison__table-item__yaymail-pro",children:__("YayMail Pro","yaymail")}),Mn.jsx("div",{className:"yaymail-go-pro__comparison__table-item__placeholder"})]}),t.items.map(((e,t)=>Mn.jsxs("div",{className:"yaymail-go-pro__comparison__table-item",children:[Mn.jsx("div",{className:"yaymail-go-pro__comparison__table-item__name",children:e.title}),Mn.jsx("div",{className:"yaymail-go-pro__comparison__table-item__yaymail-free",children:e.upgrade?xX:wX}),Mn.jsx("div",{className:"yaymail-go-pro__comparison__table-item__yaymail-pro",children:wX}),Mn.jsx("div",{className:"yaymail-go-pro__comparison__table-item__placeholder"})]},`item-${n}-${t}`)))]},n))),Mn.jsx("div",{className:"yaymail-go-pro__comparison__table-group",children:Mn.jsxs("div",{className:"yaymail-go-pro__comparison__table-item",children:[Mn.jsx("div",{className:"yaymail-go-pro__comparison__table-item__name"}),Mn.jsx("div",{className:"yaymail-go-pro__comparison__table-item__yaymail-free",children:Mn.jsx(rW,{className:"yaymail-go-pro__comparison__table__current-plan-button",disabled:!0,children:__("Your current","yaymail")})}),Mn.jsx("div",{className:"yaymail-go-pro__comparison__table-item__yaymail-pro",children:Mn.jsx(rW,{})}),Mn.jsx("div",{className:"yaymail-go-pro__comparison__table-item__placeholder"})]})})]})]})}const _X=window.yaymailData.urls.asset_url+"go-pro-background.png";function SX(){return Mn.jsxs("div",{className:"yaymail-go-pro-container",children:[Mn.jsxs("div",{className:"yaymail-go-pro__main",children:[Mn.jsxs("div",{className:"yaymail-go-pro__main__content",style:{background:`url("${_X}")`,backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:[Mn.jsx("h1",{className:"yaymail-go-pro__main__content__title",children:__("Upgrade to YayMail Pro","yaymail")}),Mn.jsx("p",{className:"yaymail-go-pro__main__content__description",children:__("Consider upgrading to YayMail Pro? It would be the best move you can make for your ecommerce store.","yaymail")}),Mn.jsx(rW,{})]}),Mn.jsx("div",{className:"yaymail-go-pro__main__sub-content",children:Mn.jsx(oW,{})})]}),Mn.jsx("div",{className:"yaymail-go-pro__comparison-wrapper",children:Mn.jsx(CX,{})})]})}const kX=window.React.useEffect,EX=()=>{const e=h_();return kX((()=>{var t;"#third-party-integrations"===e.hash&&window.jQuery("html, body").animate({scrollTop:(null==(t=window.jQuery("#third-party-integrations").offset())?void 0:t.top)??0})}),[e.hash]),Mn.jsx(JQ,{title:"",className:"yaymail-go-pro",children:Mn.jsx(SX,{})})},$X=()=>{const e=m_();return Mn.jsxs("div",{className:"yaymail-page-not-found-layout",children:[Mn.jsx("div",{className:"yaymail-layout-header",children:Mn.jsx("span",{children:__("OOPS! PAGE NOT FOUND","yaymail")})}),Mn.jsx("div",{className:"yaymail-layout-main",children:Mn.jsx("span",{children:"404"})}),Mn.jsx("div",{className:"yaymail-layout-footer",children:Mn.jsx("span",{children:__("WE ARE SORRY, BUT THE PAGE YOU REQUESTED WAS NOT FOUND","yaymail")})}),Mn.jsx(Ct,{type:"primary",onClick:()=>{e("/email-templates")},style:{marginTop:"2rem"},children:__("Go to dashboard","yaymail")})]})},MX=window.React.useEffect,RX=window.React.useState;function AX(){const{isFetching:e}=sA(!0),[t,n]=RX(""),[i,o]=RX(""),[r,a]=RX("new_order"),[s,l]=RX("sample_order"),[c,u]=RX(!1),[d,h]=RX(!0),[p,m]=RX(!1),[f,g]=RX("desktop"),y=()=>{m(!0)};return MX((()=>{(async()=>{try{h(!0);const e=await uE(r,s);e.success?(n(e.data.html),o(e.data.subject),u(e.data.is_disabled_send_mail)):(n(`
${__("No data to preview","yaymail")}
`),o("")),h(!1)}catch(e){h(!1),console.error(e)}})()}),[r,s]),Mn.jsx(Mn.Fragment,{children:Mn.jsx("div",{className:"yaymail-preview-email",children:Mn.jsxs("div",{className:"yaymail-preview-email__content",children:[Mn.jsx("h3",{className:"yaymail-preview-email__title",children:__("Preview Email","yaymail")}),Mn.jsx("div",{className:"yaymail-preview-email__description",children:Mn.jsx("p",{children:__("Preview real order emails with multilingual support and send test emails to several inboxes at once.","yaymail")})}),Mn.jsx("div",{className:"yaymail-preview-email__preview yaymail-preview-template__modal",children:Mn.jsxs("div",{className:"yaymail-preview-email-container",children:[Mn.jsxs("div",{className:"yaymail-preview-email__preview__header",children:[Mn.jsxs("div",{className:"yaymail-preview-email__preview__selectors",children:[Mn.jsx(wB,{value:r,onChange:a,loading:e,disabled:e}),Mn.jsx(mA,{children:Mn.jsx(vB,{onChange:l,value:s,disabled:!1})})]}),Mn.jsxs("div",{className:"yaymail-preview-email__preview__actions",children:[Mn.jsx(KV,{onChange:e=>{e!==f&&(YV("mobile"===e),g(e))},currentDevice:f}),Mn.jsxs("div",{className:"yaymail-preview-email__preview__header__btn-send-test-email",children:[Mn.jsx(Ct,{onClick:y,type:"primary",disabled:c,children:__("Send test email","yaymail")}),Mn.jsx(AB,{isOpen:p,onOpen:y,onClose:()=>{m(!1)},template:r,orderId:s,usingWooFunc:!0})]})]})]}),Mn.jsxs("div",{className:"yaymail-preview-email__preview__content yaymail-template-content yaymail-preview-template-content",children:[Mn.jsxs("div",{className:"yaymail-preview-email__preview__content__subject",children:[d?Mn.jsx(Zo,{paragraph:{rows:1},title:!1,active:d}):Mn.jsx("h2",{style:{marginTop:0},children:i}),Mn.jsxs("div",{className:"yaymail-preview-email__preview__content__subject__email-address",children:[Mn.jsx("div",{className:"yaymail-preview-email__preview__content__subject__email-address__icon",children:Mn.jsx(ZV,{})}),Mn.jsxs("p",{style:{margin:0,display:"flex",alignItems:"center",flexWrap:"wrap"},children:[Mn.jsx("span",{style:{fontWeight:"bold",marginRight:"3px"},children:window.yaymailData.site_title}),Mn.jsx("span",{children:`<${window.yaymailData.test_email_address}>`})]})]})]}),d||""===t?Mn.jsx("div",{style:{width:"100%",height:"100%",overflow:"auto",textAlign:"center"},className:"yaymail-preview-email__preview__content__body yaymail-preview-email__preview__content__body--loading",children:Mn.jsxs("div",{style:{maxWidth:"650px",margin:"auto"},className:"yaymail-skeleton-divider",children:[Mn.jsx(Zo,{title:!1,round:!0,paragraph:{rows:1,width:"30%"},style:{marginBottom:10}}),Mn.jsx(Zo,{title:!1,round:!0,paragraph:{rows:1,width:"100%"},className:"yaymail-skeleton-divider__image",style:{marginBottom:10}}),Mn.jsx(Zo,{title:!1,round:!0,paragraph:{rows:1,width:"70%"}}),Mn.jsx(Zo,{title:!1,round:!0,paragraph:{rows:1,width:"100%"}}),Mn.jsx(Zo,{title:!1,round:!0,paragraph:{rows:1,width:"100%"}})]})}):Mn.jsx("div",{style:{width:"100%",height:"100%",overflow:"auto",textAlign:"center"},className:"yaymail-preview-email__preview__content__body",dangerouslySetInnerHTML:{__html:t}})]})]})})]})})})}const OX=()=>Mn.jsx(JQ,{title:"Preview Email",className:"yaymail-preview-email",children:Mn.jsx(AX,{})}),jX=()=>{const e=Mn.jsxs(Mn.Fragment,{children:["It looks like you haven’t migrated your email customizations to the new version yet. Until the migration is completed:",Mn.jsxs("ul",{children:[Mn.jsx("li",{children:"Your old email elements cannot be used in the customizer, and unmigrated elements might be lost permanently."}),Mn.jsx("li",{children:"Emails sent before the migration will use WooCommerce’s default template, not your previously customized version."}),Mn.jsx("li",{children:"No actions can be taken in the customizer until the migration process is started and completed."})]})]});return Mn.jsx(Jn,{message:__("Migration Required to Continue","yaymail"),description:e,type:"warning",showIcon:!0,className:"yaymail-settings-critical-migration-needed-alert"})};function TX(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var NX={exports:{}};!function(e){e.exports=function e(t,n,i){function o(a,s){if(!n[a]){if(!t[a]){if(!s&&TX)return TX(a);if(r)return r(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return o(t[a][1][e]||e)}),c,c.exports,e,t,n,i)}return n[a].exports}for(var r=TX,a=0;a>2,s=(3&t)<<4|n>>4,l=1>6:64,c=2>4,n=(15&a)<<4|(s=r.indexOf(e.charAt(c++)))>>2,i=(3&s)<<6|(l=r.indexOf(e.charAt(c++))),h[u++]=t,64!==s&&(h[u++]=n),64!==l&&(h[u++]=i);return h}},{"./support":30,"./utils":32}],2:[function(e,t,n){var i=e("./external"),o=e("./stream/DataWorker"),r=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function s(e,t,n,i,o){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=i,this.compressedContent=o}s.prototype={getContentWorker:function(){var e=new o(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new o(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new r).pipe(new a("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new a("compressedSize")).withStreamInfo("compression",t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){var i=e("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},n.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){var i=e("./utils"),o=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==i.getTypeOf(e)?function(e,t,n){var i=o,r=0+n;e^=-1;for(var a=0;a>>8^i[255&(e^t[a])];return-1^e}(0|t,e,e.length):function(e,t,n){var i=o,r=0+n;e^=-1;for(var a=0;a>>8^i[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length):0}},{"./utils":32}],5:[function(e,t,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){var i;i="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:i}},{lie:37}],7:[function(e,t,n){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,o=e("pako"),r=e("./utils"),a=e("./stream/GenericWorker"),s=i?"uint8array":"array";function l(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic="\b\0",r.inherits(l,a),l.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(r.transformTo(s,e.data),!1)},l.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new l("Deflate",e)},n.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){function i(e,t){var n,i="";for(n=0;n>>=8;return i}function o(e,t,n,o,a,u){var d,h,p=e.file,m=e.compression,f=u!==s.utf8encode,g=r.transformTo("string",u(p.name)),y=r.transformTo("string",s.utf8encode(p.name)),v=p.comment,b=r.transformTo("string",u(v)),w=r.transformTo("string",s.utf8encode(v)),x=y.length!==p.name.length,C=w.length!==v.length,_="",S="",k="",E=p.dir,$=p.date,M={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(M.crc32=e.crc32,M.compressedSize=e.compressedSize,M.uncompressedSize=e.uncompressedSize);var R=0;t&&(R|=8),f||!x&&!C||(R|=2048);var A,O,j=0,T=0;E&&(j|=16),"UNIX"===a?(T=798,j|=(O=A=p.unixPermissions,A||(O=E?16893:33204),(65535&O)<<16)):(T=20,j|=function(e){return 63&(e||0)}(p.dosPermissions)),d=$.getUTCHours(),d<<=6,d|=$.getUTCMinutes(),d<<=5,d|=$.getUTCSeconds()/2,h=$.getUTCFullYear()-1980,h<<=4,h|=$.getUTCMonth()+1,h<<=5,h|=$.getUTCDate(),x&&(S=i(1,1)+i(l(g),4)+y,_+="up"+i(S.length,2)+S),C&&(k=i(1,1)+i(l(b),4)+w,_+="uc"+i(k.length,2)+k);var N="";return N+="\n\0",N+=i(R,2),N+=m.magic,N+=i(d,2),N+=i(h,2),N+=i(M.crc32,4),N+=i(M.compressedSize,4),N+=i(M.uncompressedSize,4),N+=i(g.length,2),N+=i(_.length,2),{fileRecord:c.LOCAL_FILE_HEADER+N+g+_,dirRecord:c.CENTRAL_FILE_HEADER+i(T,2)+N+i(b.length,2)+"\0\0\0\0"+i(j,4)+i(o,4)+g+_+b}}var r=e("../utils"),a=e("../stream/GenericWorker"),s=e("../utf8"),l=e("../crc32"),c=e("../signature");function u(e,t,n,i){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=i,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}r.inherits(u,a),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-i-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=o(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t,n=this.streamFiles&&!e.file.dir,r=o(e,n,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),n)this.push({data:(t=e,c.DATA_DESCRIPTOR+i(t.crc32,4)+i(t.compressedSize,4)+i(t.uncompressedSize,4)),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return i.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=o},{"../utils":32}],19:[function(e,t,n){var i=e("./Uint8ArrayReader");function o(e){i.call(this,e)}e("../utils").inherits(o,i),o.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){var i=e("./DataReader");function o(e){i.call(this,e)}e("../utils").inherits(o,i),o.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},o.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},o.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},o.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=o},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){var i=e("./ArrayReader");function o(e){i.call(this,e)}e("../utils").inherits(o,i),o.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){var i=e("../utils"),o=e("../support"),r=e("./ArrayReader"),a=e("./StringReader"),s=e("./NodeBufferReader"),l=e("./Uint8ArrayReader");t.exports=function(e){var t=i.getTypeOf(e);return i.checkSupport(t),"string"!==t||o.uint8array?"nodebuffer"===t?new s(e):o.uint8array?new l(i.transformTo("uint8array",e)):new r(i.transformTo("array",e)):new a(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,n){var i=e("./GenericWorker"),o=e("../utils");function r(e){i.call(this,"ConvertWorker to "+e),this.destType=e}o.inherits(r,i),r.prototype.processChunk=function(e){this.push({data:o.transformTo(this.destType,e.data),meta:e.meta})},t.exports=r},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){var i=e("./GenericWorker"),o=e("../crc32");function r(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(r,i),r.prototype.processChunk=function(e){this.streamInfo.crc32=o(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=r},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){var i=e("../utils"),o=e("./GenericWorker");function r(e){o.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}i.inherits(r,o),r.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}o.prototype.processChunk.call(this,e)},t.exports=r},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){var i=e("../utils"),o=e("./GenericWorker");function r(e){o.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=i.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}i.inherits(r,o),r.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},r.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},r.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},r.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=r},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){function i(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n "+e:e}},t.exports=i},{}],29:[function(e,t,n){var i=e("../utils"),o=e("./ConvertWorker"),r=e("./GenericWorker"),a=e("../base64"),s=e("../support"),l=e("../external"),c=null;if(s.nodestream)try{c=e("../nodejs/NodejsStreamOutputAdapter")}catch(d){}function u(e,t,n){var a=t;switch(t){case"blob":case"arraybuffer":a="uint8array";break;case"base64":a="string"}try{this._internalType=a,this._outputType=t,this._mimeType=n,i.checkSupport(a),this._worker=e.pipe(new o(a)),e.lock()}catch(s){this._worker=new r("error"),this._worker.error(s)}}u.prototype={accumulate:function(e){return function(e,t){return new l.Promise((function(n,o){var r=[],s=e._internalType,l=e._outputType,c=e._mimeType;e.on("data",(function(e,n){r.push(e),t&&t(n)})).on("error",(function(e){r=[],o(e)})).on("end",(function(){try{var e=function(e,t,n){switch(e){case"blob":return i.newBlob(i.transformTo("arraybuffer",t),n);case"base64":return a.encode(t);default:return i.transformTo(e,t)}}(l,function(e,t){var n,i=0,o=null,r=0;for(n=0;n>>6:(n<65536?t[a++]=224|n>>>12:(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63),t[a++]=128|n>>>6&63),t[a++]=128|63&n);return t}(e)},n.utf8decode=function(e){return o.nodebuffer?i.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,n,o,r,a=e.length,l=new Array(2*a);for(t=n=0;t>10&1023,l[n++]=56320|1023&o)}return l.length!==n&&(l.subarray?l=l.subarray(0,n):l.length=n),i.applyFromCharCode(l)}(e=i.transformTo(o.uint8array?"uint8array":"array",e))},i.inherits(c,a),c.prototype.processChunk=function(e){var t=i.transformTo(o.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var r=t;(t=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),t.set(r,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var a=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+s[e[n]]>t?n:t}(t),l=t;a!==t.length&&(o.uint8array?(l=t.subarray(0,a),this.leftOver=t.subarray(a,t.length)):(l=t.slice(0,a),this.leftOver=t.slice(a,t.length))),this.push({data:n.utf8decode(l),meta:e.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=c,i.inherits(u,a),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){var i=e("./support"),o=e("./base64"),r=e("./nodejsUtils"),a=e("./external");function s(e){return e}function l(e,t){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=i(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,i,o=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4>>6:(n<65536?t[a++]=224|n>>>12:(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63),t[a++]=128|n>>>6&63),t[a++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new i.Buf8(e.length),n=0,o=t.length;n>10&1023,c[i++]=56320|1023&o)}return l(c,i)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){t.exports=function(e,t,n,i){for(var o=65535&e,r=e>>>16&65535,a=0;0!==n;){for(n-=a=2e3>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,o){var r=i,a=o+n;e^=-1;for(var s=o;s>>8^r[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,n){var i,o=e("../utils/common"),r=e("./trees"),a=e("./adler32"),s=e("./crc32"),l=e("./messages"),c=-2,u=258,d=262,h=113;function p(e,t){return e.msg=l[t],t}function m(e){return(e<<1)-(4e.avail_out&&(n=e.avail_out),0!==n&&(o.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function y(e,t){r._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,g(e.strm)}function v(e,t){e.pending_buf[e.pending++]=t}function b(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function w(e,t){var n,i,o=e.max_chain_length,r=e.strstart,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-d?e.strstart-(e.w_size-d):0,c=e.window,h=e.w_mask,p=e.prev,m=e.strstart+u,f=c[r+a-1],g=c[r+a];e.prev_length>=e.good_match&&(o>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(n=t)+a]===g&&c[n+a-1]===f&&c[n]===c[r]&&c[++n]===c[r+1]){r+=2,n++;do{}while(c[++r]===c[++n]&&c[++r]===c[++n]&&c[++r]===c[++n]&&c[++r]===c[++n]&&c[++r]===c[++n]&&c[++r]===c[++n]&&c[++r]===c[++n]&&c[++r]===c[++n]&&rl&&0!=--o);return a<=e.lookahead?a:e.lookahead}function x(e){var t,n,i,r,l,c,u,h,p,m,f=e.w_size;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-d)){for(o.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=n=e.hash_size;i=e.head[--t],e.head[t]=f<=i?i-f:0,--n;);for(t=n=f;i=e.prev[--t],e.prev[t]=f<=i?i-f:0,--n;);r+=f}if(0===e.strm.avail_in)break;if(c=e.strm,u=e.window,h=e.strstart+e.lookahead,m=void 0,(p=r)<(m=c.avail_in)&&(m=p),n=0===m?0:(c.avail_in-=m,o.arraySet(u,c.input,c.next_in,m,h),1===c.state.wrap?c.adler=a(c.adler,u,m,h):2===c.state.wrap&&(c.adler=s(c.adler,u,m,h)),c.next_in+=m,c.total_in+=m,m),e.lookahead+=n,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3)if(i=r._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3&&e.match_length<=e.prev_length){for(o=e.strstart+e.lookahead-3,i=r._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=o&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(x(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+n;if((0===e.strstart||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,y(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-d&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(y(e,!1),e.strm.avail_out),1)})),new S(4,4,8,4,C),new S(4,5,16,8,C),new S(4,6,32,32,C),new S(4,4,16,16,_),new S(8,16,32,32,_),new S(8,16,128,128,_),new S(8,32,128,256,_),new S(32,128,258,1024,_),new S(32,258,258,4096,_)],n.deflateInit=function(e,t){return M(e,t,8,15,8,0)},n.deflateInit2=M,n.deflateReset=$,n.deflateResetKeep=E,n.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?c:(e.state.gzhead=t,0):c},n.deflate=function(e,t){var n,o,a,l;if(!e||!e.state||5>8&255),v(o,o.gzhead.time>>16&255),v(o,o.gzhead.time>>24&255),v(o,9===o.level?2:2<=o.strategy||o.level<2?4:0),v(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(v(o,255&o.gzhead.extra.length),v(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(e.adler=s(e.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(v(o,0),v(o,0),v(o,0),v(o,0),v(o,0),v(o,9===o.level?2:2<=o.strategy||o.level<2?4:0),v(o,3),o.status=h);else{var d=8+(o.w_bits-8<<4)<<8;d|=(2<=o.strategy||o.level<2?0:o.level<6?1:6===o.level?2:3)<<6,0!==o.strstart&&(d|=32),d+=31-d%31,o.status=h,b(o,d),0!==o.strstart&&(b(o,e.adler>>>16),b(o,65535&e.adler)),e.adler=1}if(69===o.status)if(o.gzhead.extra){for(a=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),g(e),a=o.pending,o.pending!==o.pending_buf_size));)v(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),g(e),a=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindexa&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),0===l&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){a=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>a&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),g(e),a=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindexa&&(e.adler=s(e.adler,o.pending_buf,o.pending-a,a)),0===l&&(o.status=103)}else o.status=103;if(103===o.status&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&g(e),o.pending+2<=o.pending_buf_size&&(v(o,255&e.adler),v(o,e.adler>>8&255),e.adler=0,o.status=h)):o.status=h),0!==o.pending){if(g(e),0===e.avail_out)return o.last_flush=-1,0}else if(0===e.avail_in&&m(t)<=m(n)&&4!==t)return p(e,-5);if(666===o.status&&0!==e.avail_in)return p(e,-5);if(0!==e.avail_in||0!==o.lookahead||0!==t&&666!==o.status){var w=2===o.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(x(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=r._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(o,t):3===o.strategy?function(e,t){for(var n,i,o,a,s=e.window;;){if(e.lookahead<=u){if(x(e),e.lookahead<=u&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=r._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=r._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(o,t):i[o.level].func(o,t);if(3!==w&&4!==w||(o.status=666),1===w||3===w)return 0===e.avail_out&&(o.last_flush=-1),0;if(2===w&&(1===t?r._tr_align(o):5!==t&&(r._tr_stored_block(o,0,0,!1),3===t&&(f(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),g(e),0===e.avail_out))return o.last_flush=-1,0}return 4!==t?0:o.wrap<=0?1:(2===o.wrap?(v(o,255&e.adler),v(o,e.adler>>8&255),v(o,e.adler>>16&255),v(o,e.adler>>24&255),v(o,255&e.total_in),v(o,e.total_in>>8&255),v(o,e.total_in>>16&255),v(o,e.total_in>>24&255)):(b(o,e.adler>>>16),b(o,65535&e.adler)),g(e),0=n.w_size&&(0===s&&(f(n.head),n.strstart=0,n.block_start=0,n.insert=0),h=new o.Buf8(n.w_size),o.arraySet(h,t,p-n.w_size,n.w_size,0),t=h,p=n.w_size),l=e.avail_in,u=e.next_in,d=e.input,e.avail_in=p,e.next_in=0,e.input=t,x(n);n.lookahead>=3;){for(i=n.strstart,r=n.lookahead-2;n.ins_h=(n.ins_h<>>=w=b>>>24,m-=w,0==(w=b>>>16&255))E[r++]=65535&b;else{if(!(16&w)){if(!(64&w)){b=f[(65535&b)+(p&(1<>>=w,m-=w),m<15&&(p+=k[i++]<>>=w=b>>>24,m-=w,!(16&(w=b>>>16&255))){if(!(64&w)){b=g[(65535&b)+(p&(1<>>=w,m-=w,(w=r-a)>3,p&=(1<<(m-=x<<3))-1,e.next_in=i,e.next_out=r,e.avail_in=i>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function u(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function d(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new i.Buf32(852),t.distcode=t.distdyn=new i.Buf32(592),t.sane=1,t.back=-1,0):l}function h(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,d(e)):l}function p(e,t){var n,i;return e&&e.state?(i=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=a.wsize?(i.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(o<(r=a.wsize-a.wnext)&&(r=o),i.arraySet(a.window,t,n-o,r,a.wnext),(o-=r)?(i.arraySet(a.window,t,n-o,o,0),a.wnext=o,a.whave=a.wsize):(a.wnext+=r,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,n.check=r(n.check,I,2,0),y=g=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&g)<<8)+(g>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&g)){e.msg="unknown compression method",n.mode=30;break}if(y-=4,O=8+(15&(g>>>=4)),0===n.wbits)n.wbits=O;else if(O>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(I[0]=255&g,I[1]=g>>>8&255,n.check=r(n.check,I,2,0)),y=g=0,n.mode=3;case 3:for(;y<32;){if(0===m)break e;m--,g+=u[h++]<>>8&255,I[2]=g>>>16&255,I[3]=g>>>24&255,n.check=r(n.check,I,4,0)),y=g=0,n.mode=4;case 4:for(;y<16;){if(0===m)break e;m--,g+=u[h++]<>8),512&n.flags&&(I[0]=255&g,I[1]=g>>>8&255,n.check=r(n.check,I,2,0)),y=g=0,n.mode=5;case 5:if(1024&n.flags){for(;y<16;){if(0===m)break e;m--,g+=u[h++]<>>8&255,n.check=r(n.check,I,2,0)),y=g=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(m<(C=n.length)&&(C=m),C&&(n.head&&(O=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),i.arraySet(n.head.extra,u,h,C,O)),512&n.flags&&(n.check=r(n.check,u,C,h)),m-=C,h+=C,n.length-=C),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===m)break e;for(C=0;O=u[h+C++],n.head&&O&&n.length<65536&&(n.head.name+=String.fromCharCode(O)),O&&C>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;y<32;){if(0===m)break e;m--,g+=u[h++]<>>=7&y,y-=7&y,n.mode=27;break}for(;y<3;){if(0===m)break e;m--,g+=u[h++]<>>=1)){case 0:n.mode=14;break;case 1:if(v(n),n.mode=20,6!==t)break;g>>>=2,y-=2;break e;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}g>>>=2,y-=2;break;case 14:for(g>>>=7&y,y-=7&y;y<32;){if(0===m)break e;m--,g+=u[h++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&g,y=g=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(C=n.length){if(m>>=5,y-=5,n.ndist=1+(31&g),g>>>=5,y-=5,n.ncode=4+(15&g),g>>>=4,y-=4,286>>=3,y-=3}for(;n.have<19;)n.lens[D[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,T={bits:n.lenbits},j=s(0,n.lens,0,19,n.lencode,0,n.work,T),n.lenbits=T.bits,j){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,$=65535&L,!((k=L>>>24)<=y);){if(0===m)break e;m--,g+=u[h++]<>>=k,y-=k,n.lens[n.have++]=$;else{if(16===$){for(N=k+2;y>>=k,y-=k,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}O=n.lens[n.have-1],C=3+(3&g),g>>>=2,y-=2}else if(17===$){for(N=k+3;y>>=k)),g>>>=3,y-=3}else{for(N=k+7;y>>=k)),g>>>=7,y-=7}if(n.have+C>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;C--;)n.lens[n.have++]=O}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,T={bits:n.lenbits},j=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,T),n.lenbits=T.bits,j){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,T={bits:n.distbits},j=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,T),n.distbits=T.bits,j){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(6<=m&&258<=f){e.next_out=p,e.avail_out=f,e.next_in=h,e.avail_in=m,n.hold=g,n.bits=y,a(e,x),p=e.next_out,d=e.output,f=e.avail_out,h=e.next_in,u=e.input,m=e.avail_in,g=n.hold,y=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;E=(L=n.lencode[g&(1<>>16&255,$=65535&L,!((k=L>>>24)<=y);){if(0===m)break e;m--,g+=u[h++]<>M)])>>>16&255,$=65535&L,!(M+(k=L>>>24)<=y);){if(0===m)break e;m--,g+=u[h++]<>>=M,y-=M,n.back+=M}if(g>>>=k,y-=k,n.back+=k,n.length=$,0===E){n.mode=26;break}if(32&E){n.back=-1,n.mode=12;break}if(64&E){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&E,n.mode=22;case 22:if(n.extra){for(N=n.extra;y>>=n.extra,y-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;E=(L=n.distcode[g&(1<>>16&255,$=65535&L,!((k=L>>>24)<=y);){if(0===m)break e;m--,g+=u[h++]<>M)])>>>16&255,$=65535&L,!(M+(k=L>>>24)<=y);){if(0===m)break e;m--,g+=u[h++]<>>=M,y-=M,n.back+=M}if(g>>>=k,y-=k,n.back+=k,64&E){e.msg="invalid distance code",n.mode=30;break}n.offset=$,n.extra=15&E,n.mode=24;case 24:if(n.extra){for(N=n.extra;y>>=n.extra,y-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===f)break e;if(C=x-f,n.offset>C){if((C=n.offset-C)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}_=C>n.wnext?(C-=n.wnext,n.wsize-C):n.wnext-C,C>n.length&&(C=n.length),S=n.window}else S=d,_=p-n.offset,C=n.length;for(fv?(w=D[H+d[S]],T[N+d[S]]):(w=96,0),p=1<<_-R,k=m=1<>R)+(m-=p)]=b<<24|w<<16|x,0!==m;);for(p=1<<_-1;j&p;)p>>=1;if(0!==p?(j&=p-1,j+=p):j=0,S++,0==--L[_]){if(_===E)break;_=t[n+d[S]]}if($<_&&(j&g)!==f){for(0===R&&(R=$),y+=k,A=1<<(M=_-R);M+R>>7)]}function k(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function E(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<>>=1,n<<=1,0<--t;);return n>>>1}function R(e,t,n){var i,o,r=new Array(16),a=0;for(i=1;i<=l;i++)r[i]=a=a+n[i-1]<<1;for(o=0;o<=t;o++){var s=e[2*o+1];0!==s&&(e[2*o]=M(r[s]++,s))}}function A(e){var t;for(t=0;t>1;1<=n;n--)T(e,r,n);for(o=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],T(e,r,1),i=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=i,r[2*o]=r[2*n]+r[2*i],e.depth[o]=(e.depth[n]>=e.depth[i]?e.depth[n]:e.depth[i])+1,r[2*n+1]=r[2*i+1]=o,e.heap[1]=o++,T(e,r,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,i,o,r,a,s,c=t.dyn_tree,u=t.max_code,d=t.stat_desc.static_tree,h=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,m=t.stat_desc.extra_base,f=t.stat_desc.max_length,g=0;for(r=0;r<=l;r++)e.bl_count[r]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)f<(r=c[2*c[2*(i=e.heap[n])+1]+1]+1)&&(r=f,g++),c[2*i+1]=r,u>=7;i>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t>>3,(a=e.static_len+3+7>>>3)<=o&&(o=a)):o=a=n+5,n+4<=o&&-1!==t?P(e,t,n,i):4===e.strategy||a===o?(E(e,2+(i?1:0),3),N(e,p,m)):(E(e,4+(i?1:0),3),function(e,t,n,i){var o;for(E(e,t-257,5),E(e,n-1,5),E(e,i-4,4),o=0;o>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(g[n]+r+1)]++,e.dyn_dtree[2*S(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){var t;E(e,2,3),$(e,256,p),16===(t=e).bi_valid?(k(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}},{"../utils/common":41}],53:[function(e,t,n){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){!function(e){if(!e.setImmediate){var t,n,i,o,r=1,a={},s=!1,l=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,t="[object process]"==={}.toString.call(e.process)?function(e){process.nextTick((function(){d(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(o="setImmediate$"+Math.random()+"$",e.addEventListener?e.addEventListener("message",h,!1):e.attachEvent("onmessage",h),function(t){e.postMessage(o+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){d(e.data)},function(e){i.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(n=l.documentElement,function(e){var t=l.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,n.removeChild(t),t=null},n.appendChild(t)}):function(e){setTimeout(d,0,e)},c.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var n=new Array(arguments.length-1),i=0;i{const e=Lx((e=>e.notify)),t=QS(),n=DX(null),[i,o]=HX(null),[r,a]=HX(!1),[s,l]=HX(!1),c=IX((async()=>{try{l(!0);const e=await async function(){try{const e=await window.jQuery.ajax({type:"POST",url:window.yaymailData.admin_ajax.url,data:{action:"yaymail_export_state",nonce:window.yaymailData.admin_ajax.nonce}});if(!e.success)throw new Error("Call ajax failed");return e}catch(e){throw console.error(e),e}}();if(!e.success)throw new Error(e.data.message||__("Export failed!","yaymail"));const n=e.data.data;var t=new LX;t.file("yaymail_backup.json",JSON.stringify(n)),t.generateAsync({type:"base64"}).then((function(t){let n=document.createElement("a");n.href="data:application/zip;base64,"+t,n.setAttribute("download",`${e.data.file_name}.zip`),document.body.appendChild(n),n.click(),n.remove()}))}catch(n){console.error(n),null==e||e("error",__("Export failed!","yaymail"))}finally{l(!1)}}),[]);return Mn.jsxs(Mn.Fragment,{children:[Mn.jsx("h3",{className:"yaymail-settings__title",children:__("Backups","yaymail")}),Mn.jsx("p",{className:"yaymail-settings__description",children:__("Back up and restore your YayMail data, ensuring compatibility whether you're upgrading to the latest release or reverting to a previous version.")}),Mn.jsxs("div",{className:"yaymail-settings__content",children:[Mn.jsxs("div",{className:"yaymail-settings-option-wrapper",children:[Mn.jsxs("div",{className:"yaymail-settings-label",children:[Mn.jsx("div",{className:"yaymail-settings-label__primary",children:__("Create Backup","yaymail")}),Mn.jsx("div",{className:"yaymail-settings-label__secondary",children:__("Create a backup of your YayMail data.","yaymail")})]}),Mn.jsxs("div",{className:"yaymail-settings-label secondary_column",children:[Mn.jsx("div",{className:"yaymail-settings-label__primary",children:__("Create","yaymail")}),Mn.jsx("div",{className:"yaymail-settings-label__secondary",children:Mn.jsx(bn,{direction:"vertical",size:1,children:Mn.jsx(Ct,{onClick:c,type:"primary",loading:s,children:__("Create","yaymail")})})})]})]}),Mn.jsxs("div",{className:"yaymail-settings-option-wrapper",children:[Mn.jsxs("span",{className:"yaymail-settings-label",children:[Mn.jsx("div",{className:"yaymail-settings-label__primary",children:__("Backup data","yaymail")}),Mn.jsx("div",{className:"yaymail-settings-label__secondary",children:__("Restore your YayMail data from a backup.","yaymail")})]}),Mn.jsxs("div",{className:"yaymail-settings-label secondary_column",children:[Mn.jsx("div",{className:"yaymail-settings-label__primary",children:__("Restore","yaymail")}),Mn.jsx("div",{className:"yaymail-settings-label__secondary",children:Mn.jsx(bn,{align:"start",size:"middle",children:Mn.jsxs(bn,{direction:"vertical",children:[Mn.jsx("div",{children:Mn.jsxs(vt,{layout:"inline",method:"post",encType:"multipart/form-data",onFinish:async()=>{try{if(a(!0),null===i)throw new Error(__("No file chosen.","yaymail"));const n=await async function(e){try{const t=new FormData;return t.append("import_file",e,e.name),t.append("action","yaymail_import_state"),t.append("nonce",window.yaymailData.admin_ajax.nonce),await window.jQuery.ajax({url:window.yaymailData.admin_ajax.url,type:"POST",data:t,cache:!1,processData:!1,contentType:!1})}catch(t){throw console.error(t),t}}(i);if(!n.success)throw new Error(n.data.message||__("Import failed!","yaymail"));o(null),null==e||e("success",__("State imported successfully!","yaymail")),t.invalidateQueries()}catch(n){console.error(n),null==e||e("error",__("Import failed!","yaymail"))}finally{a(!1)}},style:{gap:16},children:[Mn.jsxs(vt.Item,{style:{margin:0},children:[Mn.jsx("input",{id:"choose_file",ref:n,type:"file",multiple:!1,onChange:e=>{null!==e.currentTarget.files&&e.currentTarget.files.length>0&&o(e.currentTarget.files[0])},accept:"application/zip",style:{display:"none"}}),Mn.jsx(Ct,{onClick:()=>{var e;return null==(e=n.current)?void 0:e.click()},children:__("Choose File","yaymail")})]}),Mn.jsx(vt.Item,{style:{margin:0},children:Mn.jsx("div",{className:"yaymail-settings-import-button-wrapper",children:Mn.jsx(Ct,{loading:r,htmlType:"submit",disabled:null===i,type:"primary",children:__("Restore","yaymail")})})})]})}),Mn.jsx("span",{className:"yaymail-settings-import-file-name",children:null!==i?i.name:__("No file chosen.","yaymail")})]})})})]})]})]})]})},zX=e=>{const{isOpen:t,onClose:n,onOk:i,headerText:o,okText:r}=e;return Mn.jsx(Gb,{title:Mn.jsx(tH,{content:Mn.jsx("h4",{className:XD,children:o})}),className:"yaymail-global__modal yaymail-remove-element__modal",open:t,onCancel:n,centered:!0,width:"500px",footer:Mn.jsx(eH,{onOk:()=>{i(),n()},onCancel:()=>{n()},okText:r??__("Yes, sure!","yaymail")}),destroyOnClose:!0})},FX=lE()(nE(eE(iE(((e,t)=>({isCriticalMigrationRequired:window.yaymailData.is_critical_migration_required,setIsCriticalMigrationRequired:t=>{e((e=>{e.isCriticalMigrationRequired=t}))}}))))),oE),VX=window.React.useCallback,BX=window.React.useMemo,WX=window.React.useState,UX=({onloadData:e,isButtonDisabled:t})=>{const n=Lx((e=>e.notify)),i=QS(),o=FX((e=>e.setIsCriticalMigrationRequired)),r=VX((async()=>{try{l(!0);const e=await(async()=>await KR("/migrations/migrate"))();if(e.data.isError)return void(null==n||n("error",__("Migration failed! Please contact our support for help!","yaymail")));null==n||n("success",__("Migration succeeded!","yaymail")),o(e.data.is_critical_migration_required),i.invalidateQueries()}catch(e){console.error(e),null==n||n("error",__("Migration failed! Please contact our support for help!","yaymail"))}finally{l(!1)}}),[n,o]),a=VX((async e=>{try{l(!0);const t=await(async e=>await KR(`/migrations/reset/${e}`))(e);null==n||n("success",__("Reset succeeded!","yaymail")),o(t.data.is_critical_migration_required),i.invalidateQueries()}catch(t){console.error(t),null==n||n("error",__("Reset failed!","yaymail"))}finally{l(!1)}}),[]),[s,l]=WX(!1),[c,u]=WX(""),[d,h]=WX(!1),p=VX((()=>{h(!1)}),[]),[m,f]=WX((()=>{})),g=VX((()=>{u(__("Proceed to migrate YayMail's data to the latest version, are you sure?")),f((()=>r)),h(!0)}),[r]),[y,v]=WX(void 0),b=VX((()=>{y?(u(__("Proceed to reset YayMail's data, are you sure?")),f((()=>()=>a(y))),h(!0)):console.debug("YayMail: Please select backup name!")}),[a,y]),w=BX((()=>s||0===e.required_migrations.length||t),[s,e.required_migrations.length,t]);return Mn.jsxs(Mn.Fragment,{children:[Mn.jsx("h3",{className:"yaymail-settings__title",children:__("Migration","yaymail")}),Mn.jsx("p",{className:"yaymail-settings__description",children:__("Transfers data between different YayMail versions, ensuring compatibility whether you're upgrading to the latest release or reverting to a previous version.")}),Mn.jsxs("div",{className:"yaymail-settings__content",children:[Mn.jsxs("div",{className:"yaymail-settings-option-wrapper",children:[Mn.jsxs("div",{className:"yaymail-settings-label",children:[Mn.jsx("div",{className:"yaymail-settings-label__primary",children:__("Reset","yaymail")}),Mn.jsx("div",{className:"yaymail-settings-label__secondary",children:__("Reverting to an earlier version of YayMail's data.","yaymail")})]}),Mn.jsxs("div",{className:"yaymail-settings-label secondary_column",children:[Mn.jsx("div",{className:"yaymail-settings-label__primary",children:__("Reset","yaymail")}),Mn.jsx("div",{className:"yaymail-settings-label__secondary",children:0===e.backups.length?Mn.jsx("span",{className:"yaymail-setting-info",children:__("No backup available","yaymail")}):Mn.jsxs("div",{className:"yaymail-setting-backups-wrapper",children:[Mn.jsx(Qt,{className:"yaymail-setting-backups-selector",loading:s,placeholder:"Select backup",options:e.backups.map((e=>({value:e.name,label:`${__("Patched in","yaymail")} ${e.created_date}`}))),value:y,onChange:e=>v(e)}),Mn.jsx(Ct,{className:"yaymail-setting-btn-reset-backup",onClick:b,loading:s,disabled:s||t||!y,type:"primary",children:__("Reset","yaymail")})]})})]})]}),Mn.jsxs("div",{className:"yaymail-settings-option-wrapper",children:[Mn.jsxs("div",{className:"yaymail-settings-label",children:[Mn.jsx("div",{className:"yaymail-settings-label__primary",children:__("Migrate","yaymail")}),Mn.jsx("div",{className:"yaymail-settings-label__secondary",children:__("Migrating version data to the updated one.","yaymail")})]}),Mn.jsxs("div",{className:"yaymail-settings-label secondary_column",children:[Mn.jsx("div",{className:"yaymail-settings-label__primary",children:__("Migration","yaymail")}),Mn.jsx("div",{className:"yaymail-settings-label__secondary",children:Mn.jsxs(bn,{direction:"vertical",size:1,children:[Mn.jsx(he,{placement:"bottom",title:w?void 0:`${__("Migration is needed for: ","yaymail")} ${e.required_migrations.join(", ")}`,children:Mn.jsx(Ct,{onClick:g,type:"primary",disabled:w,loading:s,children:__("Migrate","yaymail")})}),0===e.required_migrations.length&&Mn.jsx("div",{className:"yaymail-setting-info",style:{marginTop:5},children:__("No migration needed","yaymail")})]})})]})]})]}),Mn.jsx(zX,{headerText:c,onOk:m,onClose:p,isOpen:d})]})};function YX(){return{...sk({queryKey:["migrations"],queryFn:async()=>{const e=await(async()=>await qR("/migrations/get-onload-data"))();if(e.data&&e.data.isError)throw new Error(e.data.message??"Unknown error");return e.data},retry:!1,refetchOnWindowFocus:!1,keepPreviousData:!0})}}const ZX=()=>{const{isLoading:e,data:t,isFetching:n}=YX();return e?Mn.jsx("div",{className:"yaymail-migration__spin-wrapper",children:Mn.jsx(Sn,{size:"large"})}):t?Mn.jsx(UX,{onloadData:t,isButtonDisabled:n}):null},GX=e=>lO.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("mask",{id:"mask0_2218_12633",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:0,y:0,width:24,height:24},lO.createElement("path",{d:"M24 0H0V24H24V0Z",fill:"white"})),lO.createElement("g",{mask:"url(#mask0_2218_12633)"},lO.createElement("path",{d:"M11.9987 10.1103C11.6087 10.1103 11.2187 10.0303 10.8587 9.87025L6.41877 7.93025C6.03877 7.76025 5.86877 7.32025 6.02877 6.94025C6.19877 6.56025 6.63877 6.39025 7.01877 6.55025L11.4587 8.49025C11.7987 8.64025 12.1987 8.64025 12.5387 8.49025L16.9787 6.57025C17.3587 6.41025 17.7987 6.58025 17.9687 6.96025C18.1387 7.34025 17.9587 7.78025 17.5787 7.95025L13.1387 9.87025C12.7787 10.0303 12.3887 10.1003 11.9987 10.1003V10.1103Z",fill:"black"}),lO.createElement("path",{d:"M10.94 19.08H6.72C3.98 19.08 1.75 16.85 1.75 14.11V6.72C1.75 3.98 3.98 1.75 6.72 1.75H17.28C20.02 1.75 22.25 3.98 22.25 6.72V9.89C22.25 10.3 21.91 10.64 21.5 10.64C21.09 10.64 20.75 10.3 20.75 9.89V6.72C20.75 4.81 19.19 3.25 17.28 3.25H6.72C4.81 3.25 3.25 4.81 3.25 6.72V14.11C3.25 16.02 4.81 17.58 6.72 17.58H10.94C11.35 17.58 11.69 17.92 11.69 18.33C11.69 18.74 11.35 19.08 10.94 19.08Z",fill:"black"}),lO.createElement("path",{d:"M18.3302 22.2505C16.1702 22.2505 14.4102 20.4905 14.4102 18.3305V16.2205C14.4102 15.8105 14.7502 15.4705 15.1602 15.4705C15.5702 15.4705 15.9102 15.8105 15.9102 16.2205V18.3305C15.9102 19.6605 16.9902 20.7505 18.3302 20.7505C19.6702 20.7505 20.7502 19.6705 20.7502 18.3305V14.6405C20.7502 14.1805 20.3802 13.8105 19.9202 13.8105C19.4602 13.8105 19.0902 14.1805 19.0902 14.6405V18.3305C19.0902 18.7405 18.7502 19.0805 18.3402 19.0805C17.9302 19.0805 17.5902 18.7405 17.5902 18.3305V14.6405C17.5902 13.3505 18.6402 12.3105 19.9202 12.3105C21.2002 12.3105 22.2502 13.3605 22.2502 14.6405V18.3305C22.2502 20.4905 20.4902 22.2505 18.3302 22.2505Z",fill:"black"}))),qX=e=>lO.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("path",{d:"M9.01758 1.21875C13.3247 1.21881 16.8163 4.71042 16.8164 9.01758C16.8163 10.7504 15.2379 11.7412 13.7861 11.7412H13.3262C13.2052 11.7413 13.0858 11.7701 12.9775 11.8242C12.5922 12.017 12.4362 12.4857 12.6289 12.8711C12.787 13.1876 12.8691 13.5368 12.8691 13.8906V14.0293C12.8691 15.0863 12.2684 16.2154 11.085 16.54C10.4258 16.7208 9.73214 16.8164 9.01758 16.8164C4.71042 16.8163 1.21881 13.3247 1.21875 9.01758C1.21887 4.71046 4.71046 1.21887 9.01758 1.21875ZM9.01758 2.71875C5.53888 2.71887 2.71887 5.53888 2.71875 9.01758C2.71881 12.4963 5.53885 15.3163 9.01758 15.3164C9.59687 15.3164 10.1574 15.2384 10.6885 15.0928C11.0634 14.9897 11.3691 14.5882 11.3691 14.0293V13.8906C11.3691 13.7696 11.3412 13.6493 11.2871 13.541C10.7242 12.4148 11.1805 11.0456 12.3066 10.4824C12.6232 10.3242 12.9723 10.2413 13.3262 10.2412H13.7861C14.7045 10.2412 15.3163 9.65491 15.3164 9.01758C15.3163 5.53885 12.4963 2.71881 9.01758 2.71875ZM5.38965 11.5859C5.68254 11.293 6.1573 11.293 6.4502 11.5859C6.74289 11.8788 6.74302 12.3537 6.4502 12.6465L6.43262 12.6631C6.13976 12.9559 5.66497 12.9559 5.37207 12.6631C5.07959 12.3702 5.07933 11.8953 5.37207 11.6025L5.38965 11.5859ZM4.63672 8.26758C5.05066 8.26773 5.3865 8.60365 5.38672 9.01758C5.38666 9.43164 5.05076 9.76742 4.63672 9.76758H4.6123C4.19813 9.76758 3.86237 9.43174 3.8623 9.01758C3.86252 8.60355 4.19823 8.26758 4.6123 8.26758H4.63672ZM5.37207 5.37207C5.66489 5.07925 6.13971 5.07941 6.43262 5.37207L6.4502 5.38965C6.74289 5.68256 6.74302 6.15737 6.4502 6.4502C6.15735 6.74283 5.6825 6.74282 5.38965 6.4502L5.37207 6.43262C5.07947 6.13977 5.07944 5.6649 5.37207 5.37207ZM11.6025 5.37207C11.8954 5.07917 12.3712 5.07918 12.6641 5.37207C12.9566 5.66484 12.9565 6.13976 12.6641 6.43262L12.6465 6.4502C12.3537 6.74303 11.8788 6.7429 11.5859 6.4502C11.293 6.15731 11.293 5.68255 11.5859 5.38965L11.6025 5.37207ZM9.01758 3.8623C9.43174 3.86237 9.76758 4.19813 9.76758 4.6123V4.63672C9.76742 5.05076 9.43164 5.38666 9.01758 5.38672C8.60365 5.3865 8.26773 5.05066 8.26758 4.63672V4.6123C8.26758 4.19823 8.60355 3.86252 9.01758 3.8623Z",fill:"#333333"})),KX=e=>lO.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("path",{d:"M7 14.2256L9 15.7256L12.5 11.5",stroke:"#333333",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),lO.createElement("path",{d:"M14.5 13.676C15.9738 12.9841 17 11.4381 17 9.64186C17 8.23175 16.3668 6.9768 15.3819 6.16728C14.7559 3.91793 12.7685 2.27344 10.4118 2.27344C8.38586 2.27344 6.6328 3.48882 5.78263 5.2587C5.6034 5.23456 5.42082 5.22081 5.23529 5.22081C2.89621 5.22081 1 7.20018 1 9.64186C1 11.227 1.79923 12.6174 3 13.3977C3.13776 13.4873 3.28081 13.5688 3.42854 13.6416",stroke:"#333333",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),QX=e=>lO.createElement("svg",{id:"Layer_2",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1000 500",...e},lO.createElement("defs",null,lO.createElement("style",null,"\n .st0 {\n fill: #fafbfc;\n }\n\n .st1, .st2 {\n fill: #fff;\n }\n\n .st3, .st4 {\n fill: #edeff3;\n }\n\n .st2, .st5 {\n fill-rule: evenodd;\n }\n\n .st6 {\n fill: #1f2937;\n }\n\n .st7 {\n fill: #dee2e9;\n }\n\n .st4 {\n stroke: #edeff3;\n }\n\n .st4, .st8 {\n stroke-width: .2px;\n }\n\n .st5 {\n fill: #c9ced6;\n }\n\n .st9 {\n isolation: isolate;\n opacity: .3;\n }\n\n .st8 {\n fill: #d1d5db;\n stroke: #d1d5db;\n }\n ")),lO.createElement("g",{id:"Layer_1-2"},lO.createElement("g",null,lO.createElement("rect",{className:"st1",width:1e3,height:500}),lO.createElement("g",null,lO.createElement("g",null,lO.createElement("rect",{className:"st1",x:31.8,y:31.8,width:936.5,height:190.7,rx:9,ry:9}),lO.createElement("path",{className:"st8",d:"M959.2,223H40.8c-5.2,0-9.5-4.3-9.5-9.5V40.8c0-5.2,4.3-9.5,9.5-9.5h918.5c5.2,0,9.5,4.3,9.5,9.5v172.7c0,5.2-4.3,9.5-9.5,9.5h0ZM40.8,32.2c-4.7,0-8.5,3.8-8.5,8.5v172.7c0,4.7,3.8,8.5,8.5,8.5h918.5c4.7,0,8.5-3.8,8.5-8.5V40.8c0-4.7-3.8-8.5-8.5-8.5H40.8Z"})),lO.createElement("g",null,lO.createElement("g",null,lO.createElement("rect",{className:"st0",x:57.3,y:119.9,width:430.1,height:77.5,rx:9,ry:9}),lO.createElement("path",{className:"st4",d:"M478.5,197.9H66.3c-5.2,0-9.5-4.3-9.5-9.5v-59.5c0-5.2,4.3-9.5,9.5-9.5h412.1c5.2,0,9.5,4.3,9.5,9.5v59.5c0,5.2-4.3,9.5-9.5,9.5ZM66.3,120.4c-4.7,0-8.5,3.8-8.5,8.5v59.5c0,4.7,3.8,8.5,8.5,8.5h412.1c4.7,0,8.5-3.8,8.5-8.5v-59.5c0-4.7-3.8-8.5-8.5-8.5H66.3Z"})),lO.createElement("g",{id:"Vrstva_1"},lO.createElement("path",{className:"st5",d:"M82.3,134.4h21.7l18.4,19.2v20.9c0,4.6-3.8,8.4-8.4,8.4h-31.6c-4.7,0-8.4-3.8-8.4-8.4v-31.6c0-4.7,3.8-8.4,8.4-8.4h0Z"}),lO.createElement("g",null,lO.createElement("g",{className:"st9"},lO.createElement("path",{className:"st2",d:"M103.9,134.4v19h18.4l-18.4-19Z"})),lO.createElement("path",{className:"st1",d:"M91.7,168.1v-4.4c0-.5-.4-.9-.9-.9h-2.4c-.5,0-.9.4-.9.9v4.4l-1.3,3.9c-.4,1.1-.2,2.3.5,3.2.7.9,1.8,1.5,2.9,1.5s2.2-.6,2.9-1.5.9-2.1.5-3.2l-1.3-3.9h0ZM91.2,174.2c-.7,1-2.3,1-3,0-.3-.5-.4-1.1-.2-1.7l.4-1.3h2.6l.5,1.3c.2.6,0,1.2-.3,1.7ZM84.3,139v2.4c0,.5.4.9.9.9h3.2v3.6h-3.2c-.5,0-.9.4-.9.9v1.9c0,.5.4.9.9.9h3.2v3.6h-3.2c-.5,0-.9.4-.9.9v1.9c0,.5.4.9.9.9h3.2v2.8c0,.5.4.9.9.9h4.8c.5,0,.9-.4.9-.9v-1.9c0-.5-.4-.9-.9-.9h-3.3v-3.6h3.3c.5,0,.9-.4.9-.9v-1.9c0-.5-.4-.9-.9-.9h-3.3v-3.6h3.3c.5,0,.9-.4.9-.9v-1.9c0-.5-.4-.9-.9-.9h-3.3v-3.3h-6.5Z"}))),lO.createElement("rect",{className:"st3",x:136.8,y:151.9,width:160.5,height:13.6,rx:6.8,ry:6.8})),lO.createElement("g",null,lO.createElement("g",null,lO.createElement("rect",{className:"st0",x:512.5,y:119.9,width:430.6,height:77.5,rx:9,ry:9}),lO.createElement("path",{className:"st4",d:"M934.2,197.9h-412.6c-5.2,0-9.5-4.3-9.5-9.5v-59.5c0-5.2,4.3-9.5,9.5-9.5h412.6c5.2,0,9.5,4.3,9.5,9.5v59.5c0,5.2-4.3,9.5-9.5,9.5ZM521.5,120.4c-4.7,0-8.5,3.8-8.5,8.5v59.5c0,4.7,3.8,8.5,8.5,8.5h412.6c4.7,0,8.5-3.8,8.5-8.5v-59.5c0-4.7-3.8-8.5-8.5-8.5h-412.6Z"})),lO.createElement("g",{id:"Vrstva_1-2"},lO.createElement("path",{className:"st5",d:"M537.5,134.4h21.7l18.4,19.2v20.9c0,4.6-3.8,8.4-8.4,8.4h-31.6c-4.7,0-8.4-3.8-8.4-8.4v-31.6c0-4.7,3.8-8.4,8.4-8.4h0Z"}),lO.createElement("g",null,lO.createElement("g",{className:"st9"},lO.createElement("path",{className:"st2",d:"M559.2,134.4v19h18.4l-18.4-19Z"})),lO.createElement("path",{className:"st1",d:"M546.9,168.1v-4.4c0-.5-.4-.9-.9-.9h-2.4c-.5,0-.9.4-.9.9v4.4l-1.3,3.9c-.4,1.1-.2,2.3.5,3.2.7.9,1.8,1.5,2.9,1.5s2.2-.6,2.9-1.5.9-2.1.5-3.2l-1.3-3.9h0ZM546.3,174.2c-.7,1-2.3,1-3,0-.3-.5-.4-1.1-.2-1.7l.4-1.3h2.6l.5,1.3c.2.6,0,1.2-.3,1.7ZM539.5,139v2.4c0,.5.4.9.9.9h3.2v3.6h-3.2c-.5,0-.9.4-.9.9v1.9c0,.5.4.9.9.9h3.2v3.6h-3.2c-.5,0-.9.4-.9.9v1.9c0,.5.4.9.9.9h3.2v2.8c0,.5.4.9.9.9h4.8c.5,0,.9-.4.9-.9v-1.9c0-.5-.4-.9-.9-.9h-3.3v-3.6h3.3c.5,0,.9-.4.9-.9v-1.9c0-.5-.4-.9-.9-.9h-3.3v-3.6h3.3c.5,0,.9-.4.9-.9v-1.9c0-.5-.4-.9-.9-.9h-3.3v-3.3h-6.5Z"}))),lO.createElement("rect",{className:"st3",x:615.8,y:151.9,width:232.4,height:13.6,rx:6.8,ry:6.8})),lO.createElement("g",null,lO.createElement("g",null,lO.createElement("rect",{className:"st1",x:31.8,y:236.9,width:936.5,height:67.5,rx:9,ry:9}),lO.createElement("path",{className:"st4",d:"M959.2,304.9H40.8c-5.2,0-9.5-4.3-9.5-9.5v-49.5c0-5.2,4.3-9.5,9.5-9.5h918.5c5.2,0,9.5,4.3,9.5,9.5v49.5c0,5.2-4.3,9.5-9.5,9.5h0ZM40.8,237.4c-4.7,0-8.5,3.8-8.5,8.5v49.5c0,4.7,3.8,8.5,8.5,8.5h918.5c4.7,0,8.5-3.8,8.5-8.5v-49.5c0-4.7-3.8-8.5-8.5-8.5H40.8Z"})),lO.createElement("rect",{className:"st3",x:57.3,y:264.6,width:120.4,height:13.6,rx:6.8,ry:6.8}),lO.createElement("rect",{className:"st4",x:826.6,y:261.2,width:1,height:18.9}),lO.createElement("path",{className:"st6",d:"M850.8,280v-.2c0-2.7,1.2-5.5,5.7-8.7,2.8-2,3.7-2.6,3.7-4.6s-1.1-3.2-3.2-3.2-3.2,1.3-3.5,3.3h-2.7c.3-3.1,2.3-5.6,6.3-5.6s6,2.8,6,5.3-1.2,4-4.8,6.5c-2.8,2-4,3.6-4.3,4.9h9.8l-.4,2.3h-12.6,0ZM873.8,261.3h12.2v2.4h-9.5v5.8h8.9v2.4h-8.9v8.2h-2.7v-18.8h0ZM892,261.3v18.8h-2.8v-18.8h2.8ZM897,261.3h2.8v16.4h9.7l-.4,2.4h-12.1v-18.8h0ZM924.1,271.4h-9.3v6.3h10.2l-.3,2.4h-12.5v-18.8h12.4v2.4h-9.7v5.4h9.3v2.4h0ZM930,274.8c.5,2.2,2,3.3,4.6,3.3s3.9-1.3,3.9-3-.9-2.8-4.6-3.7c-4.5-1.1-6-2.7-6-5.3s2.1-5.1,6.4-5.1,6.4,2.6,6.7,5.1h-2.8c-.3-1.6-1.3-2.9-4-2.9s-3.4,1-3.4,2.7,1,2.3,4.2,3.1c5.4,1.3,6.4,3.4,6.4,5.8s-2.3,5.5-7,5.5-6.8-2.5-7.2-5.5h2.8,0Z"})),lO.createElement("g",null,lO.createElement("g",null,lO.createElement("rect",{className:"st1",x:31.8,y:318.9,width:936.5,height:67.5,rx:9,ry:9}),lO.createElement("path",{className:"st4",d:"M959.2,386.8H40.8c-5.2,0-9.5-4.3-9.5-9.5v-49.5c0-5.2,4.3-9.5,9.5-9.5h918.5c5.2,0,9.5,4.3,9.5,9.5v49.5c0,5.2-4.3,9.5-9.5,9.5h0ZM40.8,319.4c-4.7,0-8.5,3.8-8.5,8.5v49.5c0,4.7,3.8,8.5,8.5,8.5h918.5c4.7,0,8.5-3.8,8.5-8.5v-49.5c0-4.7-3.8-8.5-8.5-8.5H40.8Z"})),lO.createElement("rect",{className:"st3",x:57.3,y:346.6,width:175.1,height:13.6,rx:6.8,ry:6.8}),lO.createElement("rect",{className:"st4",x:826.6,y:343.1,width:1,height:18.9}),lO.createElement("path",{className:"st6",d:"M859.3,362v-15.4c-.8.6-2.9,1.2-3.9,1.3v-2.1c1.7-.4,3.6-1.5,4.6-2.6h2v18.8h-2.8ZM873.8,343.2h12.2v2.4h-9.5v5.8h8.9v2.4h-8.9v8.2h-2.7v-18.8h0ZM892,343.2v18.8h-2.8v-18.8h2.8ZM897,343.2h2.8v16.4h9.7l-.4,2.4h-12.1v-18.8h0ZM924.1,353.3h-9.3v6.3h10.2l-.3,2.4h-12.5v-18.8h12.4v2.4h-9.7v5.4h9.3v2.4h0ZM930,356.7c.5,2.2,2,3.3,4.6,3.3s3.9-1.3,3.9-3-.9-2.8-4.6-3.7c-4.5-1.1-6-2.7-6-5.3s2.1-5.1,6.4-5.1,6.4,2.6,6.7,5.1h-2.8c-.3-1.6-1.3-2.9-4-2.9s-3.4,1-3.4,2.7,1,2.3,4.2,3.1c5.4,1.3,6.4,3.4,6.4,5.8s-2.3,5.5-7,5.5-6.8-2.5-7.2-5.5h2.8,0Z"})),lO.createElement("g",null,lO.createElement("g",null,lO.createElement("rect",{className:"st1",x:31.8,y:400.8,width:936.5,height:67.5,rx:9,ry:9}),lO.createElement("path",{className:"st4",d:"M959.2,468.8H40.8c-5.2,0-9.5-4.3-9.5-9.5v-49.5c0-5.2,4.3-9.5,9.5-9.5h918.5c5.2,0,9.5,4.3,9.5,9.5v49.5c0,5.2-4.3,9.5-9.5,9.5h0ZM40.8,401.3c-4.7,0-8.5,3.8-8.5,8.5v49.5c0,4.7,3.8,8.5,8.5,8.5h918.5c4.7,0,8.5-3.8,8.5-8.5v-49.5c0-4.7-3.8-8.5-8.5-8.5H40.8Z"})),lO.createElement("rect",{className:"st3",x:57.3,y:428.5,width:175.1,height:13.6,rx:6.8,ry:6.8}),lO.createElement("rect",{className:"st4",x:826.6,y:425.1,width:1,height:18.9}),lO.createElement("path",{className:"st6",d:"M863.2,434.4c0,4.5-1.4,9.8-6.7,9.8s-6.7-4.8-6.7-9.7,1.7-9.6,6.8-9.6,6.6,4.8,6.6,9.5h0ZM852.7,434.5c0,3.6.8,7.4,3.8,7.4s3.8-3.7,3.8-7.5-.7-7.3-3.8-7.3-3.9,3.3-3.9,7.4ZM873.8,425.1h12.2v2.4h-9.5v5.8h8.9v2.4h-8.9v8.2h-2.7v-18.8h0ZM892,425.1v18.8h-2.8v-18.8h2.8ZM897,425.1h2.8v16.4h9.7l-.4,2.4h-12.1v-18.8h0ZM924.1,435.3h-9.3v6.3h10.2l-.3,2.4h-12.5v-18.8h12.4v2.4h-9.7v5.4h9.3v2.4h0ZM930,438.6c.5,2.2,2,3.3,4.6,3.3s3.9-1.3,3.9-3-.9-2.8-4.6-3.7c-4.5-1.1-6-2.7-6-5.3s2.1-5.1,6.4-5.1,6.4,2.6,6.7,5.1h-2.8c-.3-1.6-1.3-2.9-4-2.9s-3.4,1-3.4,2.7,1,2.3,4.2,3.1c5.4,1.3,6.4,3.4,6.4,5.8s-2.3,5.5-7,5.5-6.8-2.5-7.2-5.5h2.8,0Z"}))),lO.createElement("g",null,lO.createElement("path",{className:"st6",d:"M72.8,76h-2.1c-.1-.4-.2-1.2-.2-2.4-.9,1.3-2.5,2.7-5.8,2.7-5.4,0-8.3-4.1-8.3-9.4s3.1-9.8,8.8-9.8,7.2,2.4,7.7,5.8h-2.8c-.6-1.9-2-3.5-5-3.5-4.3,0-5.9,3.4-5.9,7.4s1.7,7.3,5.8,7.3,5-2.7,5-5.6v-.2h-5.1v-2.4h7.8v10.2h0Z"}),lO.createElement("path",{className:"st6",d:"M78.6,69.7c0,2.6,1.3,4.5,3.6,4.5s2.7-1,3.1-2h2.7c-.5,1.8-2,4.2-5.9,4.2s-6.2-3.5-6.2-7,2.1-7.3,6.3-7.3,6,3.5,6,6.6,0,.8,0,1.1h-9.6ZM85.5,67.9c0-2.1-1.1-3.9-3.3-3.9s-3.3,1.6-3.5,3.9c0,0,6.8,0,6.8,0Z"}),lO.createElement("path",{className:"st6",d:"M91.2,65.8c0-1.2,0-2.4,0-3.5h2.6c0,.4.1,1.8,0,2.2.5-1.1,1.7-2.5,4.3-2.5s4.6,1.6,4.6,5.2v8.8h-2.7v-8.5c0-2-.8-3.3-2.8-3.3s-3.4,1.8-3.4,4.5v7.3h-2.7v-10.3h0Z"}),lO.createElement("path",{className:"st6",d:"M108.3,69.7c0,2.6,1.3,4.5,3.6,4.5s2.7-1,3.1-2h2.7c-.5,1.8-2,4.2-5.9,4.2s-6.2-3.5-6.2-7,2.1-7.3,6.3-7.3,6,3.5,6,6.6,0,.8,0,1.1h-9.6,0ZM115.2,67.9c0-2.1-1.1-3.9-3.3-3.9s-3.3,1.6-3.5,3.9c0,0,6.8,0,6.8,0Z"}),lO.createElement("path",{className:"st6",d:"M120.9,66c0-1.8,0-2.9,0-3.7h2.6c0,.4,0,1.5,0,2.7.7-1.8,2.3-3,4.6-3v2.6c-2.8,0-4.6,1.4-4.6,4.9v6.5h-2.7v-10h0Z"}),lO.createElement("path",{className:"st6",d:"M140.6,72.9c0,1.3.1,2.7.2,3.1h-2.5c-.1-.3-.2-1-.2-1.7-.5.9-1.6,2-4.2,2s-4.6-2.1-4.6-4.2c0-3.1,2.4-4.5,6.5-4.5h2.3v-1.1c0-1.2-.4-2.5-2.8-2.5s-2.5,1.1-2.8,2.1h-2.6c.2-2,1.4-4.2,5.4-4.1,3.4,0,5.3,1.4,5.3,4.5v6.4h0ZM138,69.4h-2.1c-2.6,0-4,.8-4,2.6s.9,2.3,2.5,2.3c3.1,0,3.6-2.1,3.6-4.5v-.4Z"}),lO.createElement("path",{className:"st6",d:"M144.5,76v-19.8h2.6v19.8h-2.6Z"}),lO.createElement("path",{className:"st6",d:"M161.1,70.7l-1.9,5.4h-2.8l6.6-18.8h3.4l6.9,18.8h-2.9l-2-5.4h-7.4ZM167.8,68.3c-1.7-4.7-2.7-7.3-3.1-8.8h0c-.5,1.6-1.5,4.8-2.9,8.8h6Z"}),lO.createElement("path",{className:"st6",d:"M173.5,62.3h2.3v-4h2.6v4h3v2.1h-3v7.8c0,1.3.3,1.9,1.6,1.9s.8,0,1.1,0v1.9c-.6.2-1.5.2-2.1.2-2.2,0-3.2-1.2-3.2-3.5v-8.3h-2.3v-2.1h0Z"}),lO.createElement("path",{className:"st6",d:"M181.8,62.3h2.3v-4h2.6v4h3v2.1h-3v7.8c0,1.3.3,1.9,1.6,1.9s.8,0,1.1,0v1.9c-.6.2-1.5.2-2.1.2-2.2,0-3.2-1.2-3.2-3.5v-8.3h-2.3v-2.1h0Z"}),lO.createElement("path",{className:"st6",d:"M202.7,72.9c0,1.3.1,2.7.2,3.1h-2.5c-.1-.3-.2-1-.2-1.7-.5.9-1.6,2-4.2,2s-4.6-2.1-4.6-4.2c0-3.1,2.4-4.5,6.5-4.5h2.3v-1.1c0-1.2-.4-2.5-2.8-2.5s-2.5,1.1-2.8,2.1h-2.6c.2-2,1.4-4.2,5.4-4.1,3.4,0,5.3,1.4,5.3,4.5v6.4ZM200.1,69.4h-2.1c-2.6,0-4,.8-4,2.6s.9,2.3,2.5,2.3c3.1,0,3.6-2.1,3.6-4.5v-.4Z"}),lO.createElement("path",{className:"st6",d:"M217.6,71.8c-.6,2.3-2.2,4.6-5.8,4.6s-6.2-2.8-6.2-7.1,2.2-7.3,6.4-7.3,5.4,2.9,5.6,4.6h-2.6c-.3-1.3-1.1-2.5-3-2.5s-3.6,2-3.6,5,1.3,5,3.5,5,2.6-.9,3.1-2.4h2.6Z"}),lO.createElement("path",{className:"st6",d:"M223,56.2v8c.7-1.2,1.9-2.3,4.2-2.3s4.6,1.3,4.6,5.3v8.8h-2.6v-8.3c0-2.2-.9-3.5-2.8-3.5s-3.4,1.6-3.4,4.3v7.5h-2.6v-19.8h2.6Z"}),lO.createElement("path",{className:"st6",d:"M235.8,65.8c0-1.2,0-2.4,0-3.5h2.6c0,.4.1,1.4.1,2,.6-1.2,1.8-2.3,4-2.3s3.2,1,3.8,2.4c.8-1.3,2-2.4,4.4-2.4s4.3,1.3,4.3,5v9h-2.6v-8.7c0-1.5-.6-3.1-2.6-3.1s-3,1.6-3,3.9v7.9h-2.6v-8.6c0-1.7-.5-3.2-2.5-3.2s-3.1,1.6-3.1,4.2v7.6h-2.6v-10.2h0Z"}),lO.createElement("path",{className:"st6",d:"M260.5,69.7c0,2.6,1.3,4.5,3.6,4.5s2.7-1,3.1-2h2.7c-.5,1.8-2,4.2-5.9,4.2s-6.2-3.5-6.2-7,2.1-7.3,6.3-7.3,6,3.5,6,6.6,0,.8,0,1.1h-9.6ZM267.5,67.9c0-2.1-1.1-3.9-3.3-3.9s-3.3,1.6-3.5,3.9h6.8Z"}),lO.createElement("path",{className:"st6",d:"M273.1,65.8c0-1.2,0-2.4,0-3.5h2.6c0,.4.1,1.8.1,2.2.5-1.1,1.6-2.5,4.3-2.5s4.6,1.6,4.6,5.2v8.8h-2.6v-8.5c0-2-.8-3.3-2.8-3.3s-3.4,1.8-3.4,4.5v7.3h-2.6v-10.3h0Z"}),lO.createElement("path",{className:"st6",d:"M286.7,62.3h2.3v-4h2.6v4h3v2.1h-3v7.8c0,1.3.3,1.9,1.5,1.9s.8,0,1.1,0v1.9c-.6.2-1.5.2-2.1.2-2.2,0-3.2-1.2-3.2-3.5v-8.3h-2.3v-2.1h0Z"})),lO.createElement("path",{className:"st7",d:"M325,53.7h43.6c7,0,12.7,5.7,12.7,12.7h0c0,7-5.7,12.7-12.7,12.7h-43.6c-7,0-12.7-5.7-12.7-12.7h0c0-7,5.7-12.7,12.7-12.7Z"})))),XX=()=>{const e=iM();return Mn.jsxs(Mn.Fragment,{children:[Mn.jsx("h3",{className:"yaymail-settings__title",children:__("Attachments","yaymail")}),Mn.jsx("p",{className:"yaymail-settings__description",children:__("Add Attachments to your email, so that your email will be more professional and attractive.","yaymail")}),Mn.jsx(QX,{style:{width:500,maxWidth:"100%",marginBottom:"1.5rem",display:"block"}}),Mn.jsx(rW,{href:void 0,onClick:()=>e("/go-pro")})]})},JX=()=>{const e=iM();return Mn.jsxs(Mn.Fragment,{children:[Mn.jsx("h3",{className:"yaymail-settings__title",children:__("Global variables","yaymail")}),Mn.jsx("p",{className:"yaymail-settings__description",children:__("Define global variables to use in your email templates.","yaymail")}),Mn.jsx("img",{src:window.yaymailData.urls.asset_url+"/global-variables-mockup.webp",alt:__("Global variables","yaymail"),style:{width:500,maxWidth:"100%",marginBottom:"1.5rem",display:"block"}}),Mn.jsx(rW,{href:void 0,onClick:()=>e("/go-pro")})]})},eJ=window.React.useMemo,tJ=window.React.useState,nJ=()=>Mn.jsx(Mn.Fragment,{children:Mn.jsx("h4",{className:XD,children:__("Export templates","yaymail")})}),iJ=({isOpen:e,onClose:t})=>{const n=hM((e=>e.templates)),[i,o]=tJ(["all"]),[r,a]=tJ(!1);sA(!0);const s=eJ((()=>(n??[]).map((e=>({...e,isTitleOversized:e.template_title.length>55})))),[n]);return Mn.jsx(Mn.Fragment,{children:Mn.jsx(Gb,{title:Mn.jsx(tH,{content:Mn.jsx(nJ,{})}),className:"yaymail-global__modal yaymail-reset-template__modal",open:e,onCancel:t,centered:!0,width:"500px",footer:null,destroyOnClose:!0,children:Mn.jsxs("div",{className:"modal__content",children:[Mn.jsx("div",{style:{marginBottom:10},children:__("Choose templates you want to export.","yaymail")}),Mn.jsx("div",{style:{marginTop:10},children:Mn.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[Mn.jsxs(Qt,{mode:"multiple",style:{width:"100%",marginRight:"10px"},className:"yaymail-global__select",value:i,placeholder:__("Select templates","yaymail"),onChange:e=>{if(e.includes("all")&&e.length>1&&"all"!==e[0])return void o(["all"]);const t=e.filter((e=>"all"!==e));o(t)},popupMatchSelectWidth:!1,children:[Mn.jsx(Qt.Option,{value:"all",className:"option-template",children:Mn.jsx("span",{className:"option-template__text",children:__("All templates","yaymail")})},"all"),s.map((e=>Mn.jsxs(Qt.Option,{value:e.name,className:"option-template",children:[Mn.jsx(he,{placement:"right",title:e.isTitleOversized?e.template_title:"",overlayInnerStyle:{fontSize:"11px",width:"max-content"},children:Mn.jsx("span",{className:"option-template__text",children:e.template_title})}),Mn.jsx("span",{className:"option-template__template-status","data-status":e.status})]},e.name)))]}),Mn.jsx(Ct,{type:"primary",loading:r,onClick:async()=>{a(!0);const e=i.includes("all")?null==n?void 0:n.map((e=>e.name)):i,t=await async function(e){try{const t=await window.jQuery.ajax({type:"POST",url:window.yaymailData.admin_ajax.url,data:{action:"yaymail_export_templates",nonce:window.yaymailData.admin_ajax.nonce,templates:e}});if(!t.success)throw new Error("Call ajax failed");return t}catch(t){throw console.error(t),t}}(e);if(t.success){if(t.data.data.length>0){var o=new LX;t.data.data.forEach((e=>{var t=JSON.stringify(e.templates_data);o.file(e.file_name,t)})),o.generateAsync({type:"base64"}).then((function(e){let n=document.createElement("a");n.href="data:application/zip;base64,"+e,n.setAttribute("download",t.data.file_name),document.body.appendChild(n),n.click(),n.remove()}))}a(!1)}else a(!1)},disabled:0===i.length,children:__("Export","yaymail")},"ok")]})})]})})})},oJ=window.React.useRef,rJ=window.React.useState;function aJ(){const e=QS(),t=oJ(null),[n,i]=sw.useNotification({maxCount:1}),[o,r]=rJ(!1),[a,s]=rJ(!1),[l,c]=rJ(null),u=(e,t)=>{n[e]({message:t,placement:"bottomRight",duration:3})},d=()=>{s(!0)};return Mn.jsxs(Mn.Fragment,{children:[Mn.jsx("h3",{className:"yaymail-settings__title",children:__("Import/Export","yaymail")}),Mn.jsx("p",{className:"yaymail-settings__description",children:__("Easily manage YayMail templates by importing from compatible formats or exporting for backup or sharing.","yaymail")}),Mn.jsxs("div",{className:"yaymail-settings__content",children:[Mn.jsxs("div",{className:"yaymail-settings-option-wrapper",children:[Mn.jsxs("div",{className:"yaymail-settings-label",children:[Mn.jsx("div",{className:"yaymail-settings-label__primary",children:__("Export","yaymail")}),Mn.jsx("div",{className:"yaymail-settings-label__secondary",children:__("Allows you to securely download all created YayMail templates in a convenient file format")})]}),Mn.jsxs("div",{className:"yaymail-settings-label secondary_column",children:[Mn.jsx("div",{className:"yaymail-settings-label__primary",children:__("Export","yaymail")}),Mn.jsx("div",{className:"yaymail-settings-label__secondary",children:Mn.jsx(Ct,{onClick:d,type:"primary",children:__("Export Templates","yaymail")})})]})]}),Mn.jsxs("div",{className:"yaymail-settings-option-wrapper",children:[Mn.jsxs("span",{className:"yaymail-settings-label",children:[Mn.jsx("div",{className:"yaymail-settings-label__primary",children:__("Import Templates","yaymail")}),Mn.jsx("div",{className:"yaymail-settings-label__secondary",children:__("Empowers you to seamlessly upload single or multiple YayMail templates","yaymail")})]}),Mn.jsxs("div",{className:"yaymail-settings-label secondary_column",children:[Mn.jsx("div",{className:"yaymail-settings-label__primary",children:__("Import Templates","yaymail")}),Mn.jsx("div",{className:"yaymail-settings-label__secondary",children:Mn.jsx(bn,{align:"start",size:"middle",children:Mn.jsxs(bn,{direction:"vertical",children:[Mn.jsx("div",{children:Mn.jsxs(vt,{layout:"inline",method:"post",encType:"multipart/form-data",onFinish:async()=>{var t,n;if(r(!0),null!==l){const i=await async function(e){try{const t=new FormData;return Array.from(e).forEach((e=>{t.append("file_"+e.name,e,e.name)})),t.append("action","yaymail_import_templates"),t.append("nonce",window.yaymailData.admin_ajax.nonce),await window.jQuery.ajax({url:window.yaymailData.admin_ajax.url,type:"POST",data:t,cache:!1,processData:!1,contentType:!1})}catch(t){throw console.error(t),t}}(l);i.success?(c(null),(null==(n=null==(t=i.data)?void 0:t.imported_data)?void 0:n.length)>0?(u("success",`${i.data.imported_data.length} templates imported`),i.data.imported_data.forEach((({template_name:t})=>{e.invalidateQueries({queryKey:["template",t]})}))):u("success","No template imported")):u("error",i.data.message),r(!1)}},style:{gap:16},children:[Mn.jsxs(vt.Item,{style:{margin:0},children:[Mn.jsx("input",{id:"choose_file",ref:t,type:"file",multiple:!0,onChange:e=>{null!==e.currentTarget.files&&c(e.currentTarget.files)},accept:"application/json",style:{display:"none"}}),Mn.jsx(Ct,{onClick:()=>{var e;return null==(e=t.current)?void 0:e.click()},children:__("Choose File","yaymail")})]}),Mn.jsx(vt.Item,{style:{margin:0},children:Mn.jsx("div",{className:"yaymail-settings-import-button-wrapper",children:Mn.jsx(Ct,{loading:o,htmlType:"submit",disabled:null===l,type:"primary",children:__("Import","yaymail")})})})]})}),Mn.jsx("span",{className:"yaymail-settings-import-file-name",children:null!==l?Array.from(l).map((e=>Mn.jsxs("span",{children:[Mn.jsxs("span",{children:[" ",e.name," "]}),Mn.jsx("br",{})]},e.name))):__("No file chosen.","yaymail")})]})})})]})]}),i,Mn.jsx(iJ,{isOpen:a,onOpen:d,onClose:()=>{s(!1)}})]})]})}const sJ=()=>{const e=iM();return Mn.jsxs(Mn.Fragment,{children:[Mn.jsx("h3",{className:"yaymail-settings__title",children:__("Synced patterns","yaymail")}),Mn.jsx("p",{className:"yaymail-settings__description",children:__("Sync your patterns to your email, so that your email will be more professional and attractive.","yaymail")}),Mn.jsx("img",{src:window.yaymailData.urls.asset_url+"/synced-patterns-mockup.png",alt:"Synced patterns",style:{width:500,maxWidth:"100%",marginBottom:"1.5rem",display:"block"}}),Mn.jsx(rW,{href:void 0,onClick:()=>e("/go-pro")})]})},lJ=window.React.useCallback,cJ=window.React.useMemo;function uJ(){YX();const e=h_(),t=m_(),n=FX((e=>e.isCriticalMigrationRequired)),i=cJ((()=>{var e,t;let i=(e=>[{key:"synced-patterns",label:Mn.jsxs(Mn.Fragment,{children:[Mn.jsx("span",{className:"anticon",style:{display:"inline-flex"},children:Mn.jsx(KX,{style:{width:"14px",height:"14px"}})}),Mn.jsx("span",{children:__("Synced patterns","yaymail")}),Mn.jsx(Ka,{count:__("Pro","yaymail"),color:"#FCB900",style:{marginInlineStart:5}})]}),children:Mn.jsx(sJ,{})},{key:"global-colors",label:Mn.jsxs(Mn.Fragment,{children:[Mn.jsx("span",{className:"anticon",style:{display:"inline-flex"},children:Mn.jsx(qX,{style:{width:"14px",height:"14px"}})}),Mn.jsx("span",{children:__("Global variables","yaymail")}),Mn.jsx(Ka,{count:__("Pro","yaymail"),color:"#FCB900",style:{marginInlineStart:5}})]}),children:Mn.jsx(JX,{})},{key:"attachment-file",label:Mn.jsxs(Mn.Fragment,{children:[Mn.jsx("span",{className:"anticon",style:{display:"inline-flex"},children:Mn.jsx(GX,{style:{width:"14px",height:"14px"}})}),Mn.jsx("span",{children:__("Attachments","yaymail")}),Mn.jsx(Ka,{count:__("Pro","yaymail"),color:"#FCB900",style:{marginInlineStart:5}})]}),children:Mn.jsx(XX,{})},{key:"import-export",label:Mn.jsxs(Mn.Fragment,{children:[Mn.jsx("span",{className:"anticon",style:{display:"inline-flex"},children:Mn.jsx(DV,{style:{width:"14px",height:"14px"}})}),Mn.jsx("span",{children:__("Import/Export Templates","yaymail")})]}),children:Mn.jsx(aJ,{}),disabled:e},{key:"migration",label:Mn.jsxs(Mn.Fragment,{children:[Mn.jsx(ZL,{}),Mn.jsx("span",{children:__("Migration","yaymail")})]}),children:Mn.jsx(ZX,{})},{key:"backup",label:Mn.jsxs(Mn.Fragment,{children:[Mn.jsx(QL,{}),Mn.jsx("span",{children:__("Backups","yaymail")})]}),children:Mn.jsx(PX,{})}])(n);return(null==(t=null==(e=window.yaymailData)?void 0:e.yaymailHooks)?void 0:t.applyFilters)&&(i=[...window.yaymailData.yaymailHooks.applyFilters("yaymail_setting_items",i)]),(i??[]).toSorted((function(e,t){return parseFloat(e.position??1)-parseFloat(t.position??1)}))}),[window.yaymailData.yaymailHooks,n]),o=lJ((e=>{t(`#/${e}`)}),[t]),r=cJ((()=>{var t;return(null==(t=e.hash.split("#/"))?void 0:t.pop())||"synced-patterns"}),[e]);return Mn.jsx(Ph,{className:"yaymail-settings-card",children:Mn.jsx(bh,{defaultActiveKey:"synced-patterns",activeKey:n?"migration":r,tabPosition:"left",style:{minHeight:"45vh"},items:i,className:"yaymail-settings-tabs",onChange:o})})}const dJ=()=>{const e=FX((e=>e.isCriticalMigrationRequired));return Mn.jsxs(Mn.Fragment,{children:[e&&Mn.jsx(jX,{}),Mn.jsx(JQ,{title:"Settings",className:"yaymail-settings",children:Mn.jsx(uJ,{})})]})},hJ=e=>lO.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("g",{clipPath:"url(#clip0_442_12089)"},lO.createElement("path",{d:"M6.50293 0.5C8.14639 0.5 9.49582 1.77877 9.61035 3.39355H11.7246C12.1562 3.39371 12.5058 3.74408 12.5059 4.17578V6.28906C14.1211 6.4031 15.4003 7.7536 15.4004 9.39746L15.3965 9.55664C15.3168 11.1274 14.0684 12.3936 12.5059 12.5039V14.6182C12.5057 15.0499 12.1562 15.4003 11.7246 15.4004H1.28223C0.850486 15.4004 0.500132 15.0499 0.5 14.6182V11.4629C0.500178 11.0311 0.850514 10.6816 1.28223 10.6816H1.8418C2.5495 10.6816 3.12567 10.1051 3.12598 9.39746C3.12598 8.68956 2.54969 8.11328 1.8418 8.11328H1.28223C0.850475 8.11328 0.500132 7.76278 0.5 7.33105V4.17578C0.500105 3.74398 0.850469 3.39355 1.28223 3.39355H3.39551C3.50997 1.77884 4.85958 0.500141 6.50293 0.5ZM6.50293 2.06445C5.64744 2.0646 4.95117 2.76069 4.95117 3.61621V4.17578C4.95104 4.60756 4.60069 4.95801 4.16895 4.95801H2.06445V6.56055C3.53126 6.6746 4.69043 7.90186 4.69043 9.39746C4.69011 10.8928 3.53107 12.1194 2.06445 12.2334V13.8359H10.9424V11.7314C10.9424 11.2996 11.2928 10.9492 11.7246 10.9492H12.2842C13.0862 10.9492 13.7483 10.3371 13.8281 9.55566L13.8359 9.39746C13.8359 8.5418 13.1398 7.84473 12.2842 7.84473H11.7246C11.293 7.84473 10.9428 7.49499 10.9424 7.06348V4.95801H8.83691C8.40529 4.95787 8.0558 4.60748 8.05566 4.17578V3.61621C8.05566 2.7606 7.35854 2.06445 6.50293 2.06445Z",fill:"currentColor"})),lO.createElement("defs",null,lO.createElement("clipPath",{id:"clip0_442_12089"},lO.createElement("rect",{width:16,height:16,fill:"white"})))),pJ=e=>lO.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("path",{d:"M8 0.25C9.39291 0.25 10.5131 0.248121 11.3916 0.366211C12.2917 0.487227 13.0495 0.746718 13.6514 1.34863L13.7607 1.46289C14.2856 2.04541 14.5203 2.76456 14.6338 3.6084C14.7519 4.4869 14.75 5.60709 14.75 7V9C14.75 10.3929 14.7519 11.5131 14.6338 12.3916C14.5203 13.2354 14.2856 13.9546 13.7607 14.5371L13.6514 14.6514C13.0495 15.2533 12.2917 15.5128 11.3916 15.6338C10.5131 15.7519 9.39291 15.75 8 15.75C6.60709 15.75 5.4869 15.7519 4.6084 15.6338C3.76456 15.5203 3.04541 15.2856 2.46289 14.7607L2.34863 14.6514C1.74672 14.0495 1.48723 13.2917 1.36621 12.3916C1.24812 11.5131 1.25 10.3929 1.25 9V7C1.25 5.60709 1.24812 4.4869 1.36621 3.6084C1.48723 2.70829 1.74672 1.95055 2.34863 1.34863L2.46289 1.23926C3.04541 0.714422 3.76456 0.479662 4.6084 0.366211C5.4869 0.248121 6.60709 0.25 8 0.25ZM8 1.75C6.56485 1.75 5.5639 1.75202 4.80859 1.85352C4.16663 1.93983 3.78836 2.08832 3.51855 2.30957L3.40918 2.40918C3.13242 2.68594 2.95217 3.07482 2.85352 3.80859C2.75202 4.5639 2.75 5.56485 2.75 7V9C2.75 10.4352 2.75202 11.4361 2.85352 12.1914C2.95217 12.9252 3.13242 13.3141 3.40918 13.5908L3.51855 13.6904C3.78836 13.9117 4.16663 14.0602 4.80859 14.1465C5.5639 14.248 6.56485 14.25 8 14.25C9.43515 14.25 10.4361 14.248 11.1914 14.1465C11.9252 14.0478 12.3141 13.8676 12.5908 13.5908L12.6904 13.4814C12.9117 13.2116 13.0602 12.8334 13.1465 12.1914C13.248 11.4361 13.25 10.4352 13.25 9V7C13.25 5.56485 13.248 4.5639 13.1465 3.80859C13.0602 3.16663 12.9117 2.78836 12.6904 2.51855L12.5908 2.40918C12.3141 2.13242 11.9252 1.95217 11.1914 1.85352C10.4361 1.75202 9.43515 1.75 8 1.75ZM7.54395 10.7539C7.92191 10.7925 8.2168 11.1118 8.2168 11.5C8.2168 11.8882 7.92191 12.2075 7.54395 12.2461L7.4668 12.25H5.4668C5.05258 12.25 4.7168 11.9142 4.7168 11.5C4.7168 11.0858 5.05258 10.75 5.4668 10.75H7.4668L7.54395 10.7539ZM10.1104 7.25391C10.4884 7.29246 10.7832 7.61179 10.7832 8C10.7832 8.38821 10.4884 8.70754 10.1104 8.74609L10.0332 8.75H5.46191C5.0477 8.75 4.71191 8.41421 4.71191 8C4.71192 7.58579 5.0477 7.25 5.46191 7.25H10.0332L10.1104 7.25391ZM10.5439 3.75391C10.9219 3.79253 11.2168 4.11183 11.2168 4.5C11.2168 4.88817 10.9219 5.20747 10.5439 5.24609L10.4668 5.25H5.4668C5.05258 5.25 4.7168 4.91421 4.7168 4.5C4.7168 4.08579 5.05258 3.75 5.4668 3.75H10.4668L10.5439 3.75391Z"})),mJ=e=>lO.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("path",{d:"M9.47656 1.25391C9.85481 1.29226 10.1504 1.61164 10.1504 2C10.1504 2.38836 9.85481 2.70774 9.47656 2.74609L9.40039 2.75H4.5C3.56663 2.75 2.90321 2.98546 2.47559 3.38574C2.05697 3.77772 1.75002 4.43519 1.75 5.5293V10.4707C1.75002 11.5648 2.05697 12.2223 2.47559 12.6143C2.90321 13.0145 3.56663 13.25 4.5 13.25H11.5C12.4334 13.25 13.0968 13.0145 13.5244 12.6143C13.943 12.2223 14.25 11.5648 14.25 10.4707V6.94141C14.25 6.52719 14.5858 6.19141 15 6.19141C15.4142 6.19141 15.75 6.52719 15.75 6.94141V10.4707C15.75 11.8471 15.3562 12.9539 14.5498 13.709C13.7524 14.4556 12.6664 14.75 11.5 14.75H4.5C3.33356 14.75 2.24758 14.4556 1.4502 13.709C0.643842 12.9539 0.250021 11.8471 0.25 10.4707V5.5293C0.250021 4.15293 0.643842 3.04606 1.4502 2.29102C2.24758 1.5444 3.33356 1.25 4.5 1.25H9.40039L9.47656 1.25391ZM4.41602 5.37598C4.65967 5.07371 5.08968 5.01048 5.4082 5.21777L5.4707 5.2627L7.63672 7.00879H7.63574C8.07504 7.35928 8.85791 7.35864 9.29688 7.00781L10.1162 6.34961C10.4392 6.09037 10.9116 6.14198 11.1709 6.46484C11.43 6.78778 11.3785 7.26023 11.0557 7.51953L10.2354 8.17773L10.2344 8.17871C9.24718 8.96855 7.68434 8.96872 6.69727 8.17871L6.69531 8.17676L4.5293 6.43066L4.47168 6.37988C4.20136 6.11269 4.17245 5.67831 4.41602 5.37598ZM13.0947 0.900391C13.383 0.900609 13.6699 1.09415 13.7422 1.42285L13.7441 1.42188L13.8965 2.08984L13.9268 2.18652C14.0102 2.40174 14.1918 2.56204 14.415 2.61621L15.0811 2.77051L15.0928 2.77344L15.1045 2.77734L15.2168 2.81836C15.4616 2.93398 15.6005 3.17933 15.6006 3.4248C15.6006 3.70645 15.413 3.99789 15.0801 4.07227L15.0811 4.07422L14.415 4.22852C14.1608 4.29017 13.9592 4.48963 13.8965 4.75098L13.8975 4.75195L13.7441 5.42383L13.7412 5.43457L13.7383 5.44629C13.6542 5.75704 13.3768 5.9451 13.0898 5.94531C12.8016 5.94518 12.5148 5.75139 12.4424 5.42285L12.4414 5.42383L12.2881 4.75391V4.75488C12.2264 4.49199 12.0256 4.29066 11.7705 4.22852L11.1045 4.07422L11.0918 4.07129L11.0811 4.06836C10.7665 3.98191 10.585 3.70093 10.585 3.41992C10.585 3.1381 10.7721 2.84653 11.1055 2.77246L11.1045 2.77051L11.7705 2.61621C11.9935 2.56185 12.1755 2.40164 12.2588 2.18652L12.2881 2.08984L12.4414 1.42188L12.4434 1.41016L12.4473 1.39844L12.4873 1.28809C12.6006 1.0441 12.8437 0.90055 13.0947 0.900391ZM13.0928 3.11523C13.0027 3.22892 12.8996 3.33153 12.7861 3.42188C12.8995 3.51211 13.0027 3.61495 13.0928 3.72852C13.1826 3.61534 13.2845 3.51188 13.3975 3.42188C13.2845 3.33177 13.1826 3.22853 13.0928 3.11523Z"})),fJ=e=>lO.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("path",{d:"M8 0.25C9.39291 0.25 10.5131 0.248121 11.3916 0.366211C12.2917 0.487227 13.0495 0.746718 13.6514 1.34863L13.7607 1.46289C14.2856 2.04541 14.5203 2.76456 14.6338 3.6084C14.7519 4.4869 14.75 5.60709 14.75 7V9C14.75 10.3929 14.7519 11.5131 14.6338 12.3916C14.5203 13.2354 14.2856 13.9546 13.7607 14.5371L13.6514 14.6514C13.0495 15.2533 12.2917 15.5128 11.3916 15.6338C10.5131 15.7519 9.39291 15.75 8 15.75C6.60709 15.75 5.4869 15.7519 4.6084 15.6338C3.76456 15.5203 3.04541 15.2856 2.46289 14.7607L2.34863 14.6514C1.74672 14.0495 1.48723 13.2917 1.36621 12.3916C1.24812 11.5131 1.25 10.3929 1.25 9V7C1.25 5.60709 1.24812 4.4869 1.36621 3.6084C1.48723 2.70829 1.74672 1.95055 2.34863 1.34863L2.46289 1.23926C3.04541 0.714422 3.76456 0.479662 4.6084 0.366211C5.4869 0.248121 6.60709 0.25 8 0.25ZM8 1.75C6.56485 1.75 5.5639 1.75202 4.80859 1.85352C4.16663 1.93983 3.78836 2.08832 3.51855 2.30957L3.40918 2.40918C3.13242 2.68594 2.95217 3.07482 2.85352 3.80859C2.75202 4.5639 2.75 5.56485 2.75 7V9C2.75 10.4352 2.75202 11.4361 2.85352 12.1914C2.95217 12.9252 3.13242 13.3141 3.40918 13.5908L3.51855 13.6904C3.78836 13.9117 4.16663 14.0602 4.80859 14.1465C5.5639 14.248 6.56485 14.25 8 14.25C9.43515 14.25 10.4361 14.248 11.1914 14.1465C11.9252 14.0478 12.3141 13.8676 12.5908 13.5908L12.6904 13.4814C12.9117 13.2116 13.0602 12.8334 13.1465 12.1914C13.248 11.4361 13.25 10.4352 13.25 9V7C13.25 5.56485 13.248 4.5639 13.1465 3.80859C13.0602 3.16663 12.9117 2.78836 12.6904 2.51855L12.5908 2.40918C12.3141 2.13242 11.9252 1.95217 11.1914 1.85352C10.4361 1.75202 9.43515 1.75 8 1.75ZM10.75 11C11.1642 11 11.5 11.3358 11.5 11.75C11.5 12.1642 11.1642 12.5 10.75 12.5H5.25C4.83579 12.5 4.5 12.1642 4.5 11.75C4.5 11.3358 4.83579 11 5.25 11H10.75ZM10.75 3.5C11.1642 3.5 11.5 3.83579 11.5 4.25C11.5 4.66421 11.1642 5 10.75 5H5.25C4.83579 5 4.5 4.66421 4.5 4.25C4.5 3.83579 4.83579 3.5 5.25 3.5H10.75Z"})),gJ=e=>lO.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("g",{clipPath:"url(#clip0_397_12392)"},lO.createElement("path",{d:"M7.12695 1.13135C7.65943 0.663442 8.47258 0.687797 8.96875 1.23291L8.96973 1.23193L11.2461 3.70264L12.874 1.93701L13.0234 1.78662C13.1791 1.64189 13.3522 1.51811 13.542 1.43604C13.8032 1.32315 14.1348 1.27646 14.4609 1.42334C14.7785 1.56648 14.9639 1.83589 15.0635 2.0874C15.1627 2.33822 15.2002 2.62358 15.2002 2.9126V10.9751L15.1953 11.1987C15.1518 12.3069 14.7851 13.285 14.1211 14.0054C13.4078 14.779 12.4019 15.2007 11.25 15.2007H4.74707C2.5171 15.1918 0.800281 13.2466 0.799805 10.9683V2.9126C0.799805 2.62358 0.837338 2.33822 0.936523 2.0874C1.03612 1.83589 1.22151 1.56648 1.53906 1.42334C1.86518 1.27646 2.19675 1.32315 2.45801 1.43604C2.71079 1.54536 2.93385 1.72865 3.12598 1.93701L4.75195 3.70166L7.02344 1.23291V1.23193L7.12695 1.13135ZM5.73145 4.70459L5.73242 4.70557C5.2367 5.25719 4.41741 5.28312 3.88281 4.81299L3.78027 4.7124L2.2002 2.99756V10.9683C2.20066 12.5813 3.39556 13.795 4.75293 13.8003H11.25C12.0478 13.8003 12.6676 13.5162 13.0918 13.0562C13.4669 12.6491 13.7277 12.0611 13.7871 11.3081L13.7998 10.9751V2.99756L12.2197 4.7124L12.2188 4.71143C11.7226 5.25658 10.9094 5.28093 10.377 4.81299L10.2734 4.7124L7.99609 2.2417L5.73145 4.70459ZM8 6.75049C9.24264 6.75049 10.25 7.75785 10.25 9.00049C10.2497 10.2429 9.24248 11.2505 8 11.2505C6.75752 11.2505 5.75026 10.2429 5.75 9.00049C5.75 7.75785 6.75736 6.75049 8 6.75049ZM8 8.25049C7.58579 8.25049 7.25 8.58627 7.25 9.00049C7.25026 9.41448 7.58595 9.75049 8 9.75049C8.41405 9.75049 8.74974 9.41448 8.75 9.00049C8.75 8.58627 8.41421 8.25049 8 8.25049Z",fill:"currentColor"})),lO.createElement("defs",null,lO.createElement("clipPath",{id:"clip0_397_12392"},lO.createElement("rect",{width:16,height:16,fill:"white"})))),yJ=e=>lO.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("g",{clipPath:"url(#clip0_397_11631)"},lO.createElement("path",{d:"M11.7012 8.80029C13.3031 8.80059 14.6016 10.0997 14.6016 11.7017C14.6014 12.2583 14.4432 12.7783 14.1709 13.2202L15.002 14.0493L15.0889 14.1548C15.237 14.3787 15.2375 14.6727 15.0898 14.897L15.0039 15.0024C14.7741 15.2329 14.418 15.2623 14.1562 15.0903L14.0508 15.0044L13.2168 14.1733C12.7755 14.4445 12.2566 14.6019 11.7012 14.6021C10.0992 14.6021 8.80014 13.3035 8.7998 11.7017C8.7998 10.0995 10.099 8.80029 11.7012 8.80029ZM9.90625 0.825684L9.94434 0.82666L10.6533 0.847168C11.3301 0.869672 11.9132 0.903438 12.4072 0.993652L12.6641 1.04834C13.2516 1.18879 13.7571 1.43684 14.1924 1.89502L14.3652 2.09424C14.7425 2.56802 14.9361 3.10999 15.04 3.73779L15.0771 3.99854C15.1331 4.44579 15.1574 4.95589 15.1729 5.53174L15.1885 6.25439V6.25537L15.1895 6.29443L15.2002 7.65869C15.2 8.0426 14.9004 8.37135 14.5117 8.37158C14.1228 8.37158 13.8235 8.04274 13.8232 7.65869L13.8135 6.32471C13.7979 5.56136 13.782 4.97432 13.7422 4.49854L10.3535 6.51709C9.51068 7.01891 8.78367 7.34605 8 7.34619C7.31414 7.34619 6.67159 7.09568 5.95703 6.69678L5.64648 6.51709L2.25684 4.49854C2.23085 4.8079 2.21434 5.16419 2.20312 5.58545L2.18652 6.32471C2.17304 6.98764 2.17304 7.64714 2.18652 8.31006L2.20312 9.04932C2.22123 9.729 2.24841 10.24 2.31738 10.6567L2.35254 10.8433C2.44135 11.2553 2.57779 11.5183 2.79004 11.7417L2.88281 11.8315C3.10596 12.0303 3.38606 12.1573 3.83203 12.2388L4.04297 12.272C4.55587 12.3426 5.21282 12.3611 6.12793 12.3853L6.50977 12.3911C6.61753 12.3912 6.71363 12.3896 6.81738 12.3882L7.35156 12.3853L7.49316 12.4009C7.81032 12.4706 8.03831 12.7642 8.03711 13.1001C8.0354 13.46 7.77114 13.7701 7.41797 13.8062L7.3457 13.8101C7.15816 13.8092 7.00696 13.8093 6.86133 13.811L6.8623 13.812C6.63337 13.8149 6.41628 13.8176 6.09375 13.8091H6.09277L6.05566 13.8081C5.19189 13.7854 4.45794 13.7671 3.84668 13.6821L3.59277 13.6411C2.98142 13.5294 2.45427 13.3243 1.99902 12.9243L1.80762 12.7407C1.37554 12.2858 1.14215 11.7651 1.01074 11.1616L0.959961 10.8979C0.876049 10.3911 0.845668 9.79487 0.827148 9.104L0.811523 8.38037L0.810547 8.34033C0.796658 7.65737 0.796663 6.9774 0.810547 6.29443L0.811523 6.25439L0.827148 5.53174C0.845653 4.84078 0.876105 4.24469 0.959961 3.73779L1.01074 3.47314C1.1421 2.86974 1.37572 2.34985 1.80762 1.89502L1.99902 1.71143C2.45443 1.31102 2.9811 1.10537 3.59277 0.993652L3.84668 0.953613C4.458 0.868587 5.19181 0.849411 6.05566 0.82666L6.09375 0.825684L7.04785 0.807129C8.00054 0.794536 8.95004 0.800488 9.90625 0.825684ZM11.7012 10.1479C10.8432 10.1479 10.1475 10.8436 10.1475 11.7017C10.1478 12.5594 10.8434 13.2554 11.7012 13.2554C12.5587 13.2551 13.2546 12.5592 13.2549 11.7017C13.2549 10.8438 12.5589 10.1482 11.7012 10.1479ZM7.06543 2.23096L6.12793 2.24951C5.21277 2.27362 4.55588 2.29216 4.04297 2.36279L3.83203 2.39697C3.38595 2.47846 3.10599 2.6044 2.88281 2.80322L2.79004 2.89307C2.73389 2.95219 2.68278 3.01389 2.63672 3.08057L6.33301 5.28271L6.61816 5.44678C7.24907 5.79761 7.64662 5.92139 8 5.92139C8.40367 5.92125 8.86555 5.75989 9.66699 5.28271L13.3633 3.08057C13.3422 3.04999 13.32 3.02044 13.2969 2.9917L13.21 2.89307C13.0008 2.67293 12.7502 2.52895 12.3496 2.43408L12.168 2.39697C11.7616 2.32274 11.2613 2.29206 10.5957 2.27002L9.87207 2.24951C8.9333 2.22477 8.00072 2.21859 7.06543 2.23096Z",fill:"currentColor"})),lO.createElement("defs",null,lO.createElement("clipPath",{id:"clip0_397_11631"},lO.createElement("rect",{width:16,height:16,fill:"white"})))),vJ=e=>lO.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("path",{d:"M8.17285 0.00585938C9.03682 0.0620426 9.87886 0.540311 11.4639 1.44141L12.0361 1.7666C13.7267 2.72769 14.572 3.20847 15.0361 4C15.5002 4.79151 15.5 5.75271 15.5 7.6748V8.3252L15.4932 9.59863C15.4714 10.7171 15.3842 11.4063 15.0361 12L14.9443 12.1445C14.4629 12.8532 13.6212 13.3322 12.0361 14.2334L11.4639 14.5586L10.3398 15.1895C9.3456 15.7299 8.69606 16 8 16L7.82715 15.9941C7.19359 15.9529 6.57174 15.685 5.66016 15.1895L4.53613 14.5586L3.96387 14.2334C2.37877 13.3322 1.53708 12.8532 1.05566 12.1445L0.963867 12C0.61581 11.4063 0.52858 10.7171 0.506836 9.59863L0.5 8.3252V7.6748C0.5 5.87251 0.500251 4.91527 0.882812 4.15039L0.963867 4C1.31195 3.40633 1.8749 2.98792 2.84766 2.41016L3.96387 1.7666L4.53613 1.44141C6.22653 0.480392 7.07185 0 8 0L8.17285 0.00585938ZM8 1.5C7.81933 1.5 7.59145 1.54027 7.16504 1.73047C6.93674 1.83231 6.68217 1.96229 6.37598 2.12891L5.27734 2.74609L4.70508 3.07031C3.83457 3.56521 3.27602 3.8857 2.86914 4.17285C2.48859 4.44144 2.34349 4.61266 2.25781 4.75879C2.17292 4.90364 2.0962 5.10909 2.05078 5.5625C2.02636 5.80645 2.01337 6.08727 2.00684 6.43066L2 7.6748V8.3252C2 9.31587 2.00196 9.94982 2.05078 10.4375C2.0962 10.8909 2.17292 11.0964 2.25781 11.2412C2.34349 11.3873 2.48858 11.5586 2.86914 11.8271C3.27602 12.1143 3.83457 12.4348 4.70508 12.9297L5.27734 13.2539L6.37598 13.8711C6.68217 14.0377 6.93674 14.1677 7.16504 14.2695C7.59144 14.4597 7.81933 14.5 8 14.5C8.18067 14.5 8.40856 14.4597 8.83496 14.2695C9.29142 14.0659 9.85228 13.7487 10.7227 13.2539L11.2949 12.9297L12.3867 12.3008C12.6862 12.1231 12.9274 11.9707 13.1309 11.8271C13.5114 11.5586 13.6565 11.3873 13.7422 11.2412C13.8271 11.0964 13.9038 10.8909 13.9492 10.4375C13.998 9.94982 14 9.31587 14 8.3252V7.6748C14 6.68413 13.998 6.05018 13.9492 5.5625C13.9038 5.10909 13.8271 4.90364 13.7422 4.75879C13.6565 4.61266 13.5114 4.44144 13.1309 4.17285C12.9274 4.02926 12.6862 3.87691 12.3867 3.69922L11.2949 3.07031L10.7227 2.74609C9.85228 2.25127 9.29142 1.93408 8.83496 1.73047C8.40855 1.54027 8.18067 1.5 8 1.5ZM7.05566 5.95898C7.69464 5.66055 8.44084 5.68228 9.06445 6.02344L9.11523 6.05176L9.125 6.05762L9.1748 6.08691L9.29395 6.16406C9.87193 6.56821 10.2268 7.22584 10.2432 7.93652V8.06348C10.2268 8.77416 9.87193 9.43179 9.29395 9.83594L9.1748 9.91309C9.1594 9.92246 9.14332 9.93161 9.125 9.94238L9.11523 9.94922L9.11426 9.94824L9.06445 9.97656C8.44084 10.3177 7.69464 10.3394 7.05566 10.041L6.92871 9.97656L6.87891 9.94824L6.86816 9.94238L6.81836 9.91309C6.21103 9.54352 5.81971 8.90779 5.75879 8.20508L5.75098 8.06348C5.75057 8.04551 5.75017 8.02703 5.75 8.00586V7.99414L5.75098 7.93652L5.75879 7.79492C5.81971 7.09221 6.21103 6.45648 6.81836 6.08691L6.86816 6.05762L6.87891 6.05078V6.05176C6.89724 6.04136 6.91301 6.03203 6.92871 6.02344L7.05566 5.95898ZM8.34473 7.33887C8.1552 7.23518 7.93067 7.22213 7.73242 7.2998L7.64941 7.33887C7.64643 7.3405 7.64189 7.3417 7.62793 7.34961L7.62891 7.35059L7.59766 7.36816C7.41322 7.4805 7.28961 7.66843 7.25781 7.87891L7.25 7.9707V8.0293L7.25781 8.12109C7.28961 8.33157 7.41322 8.5195 7.59766 8.63184L7.61816 8.64355L7.64941 8.66113L7.73242 8.7002C7.93067 8.77787 8.1552 8.76482 8.34473 8.66113L8.375 8.64355C8.38881 8.63542 8.3926 8.6336 8.39551 8.63184L8.4707 8.5791C8.63722 8.44626 8.73819 8.24536 8.74316 8.0293V7.9707C8.73819 7.75464 8.63722 7.55374 8.4707 7.4209L8.39551 7.36816C8.3926 7.3664 8.38881 7.36458 8.375 7.35645L8.34473 7.33887Z"})),bJ=e=>lO.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},lO.createElement("g",{clipPath:"url(#clip0_397_12417)"},lO.createElement("path",{d:"M8 0.25C12.2802 0.25 15.75 3.71979 15.75 8C15.75 12.2802 12.2802 15.75 8 15.75C3.71979 15.75 0.25 12.2802 0.25 8C0.25 3.71979 3.71979 0.25 8 0.25ZM4.13965 12.9131C5.20266 13.7495 6.54245 14.25 8 14.25C9.45579 14.25 10.794 13.7506 11.8564 12.916L10.0723 11.1318C9.48092 11.5215 8.77386 11.75 8.0127 11.75C7.24309 11.75 6.5279 11.5178 5.93262 11.1201L4.13965 12.9131ZM11.1328 5.91992C11.5305 6.5152 11.7627 7.23039 11.7627 8C11.7627 8.76728 11.5312 9.48002 11.1357 10.0742L12.917 11.8555C13.7511 10.7932 14.25 9.4553 14.25 8C14.25 6.54245 13.7495 5.20266 12.9131 4.13965L11.1328 5.91992ZM3.08301 4.14258C2.24837 5.205 1.75 6.54414 1.75 8C1.75 9.45355 2.24782 10.7899 3.08008 11.8516L4.87695 10.0547C4.48938 9.46439 4.2627 8.75893 4.2627 8C4.2627 7.23874 4.49012 6.53085 4.87988 5.93945L3.08301 4.14258ZM8.0127 5.75C6.77008 5.75 5.7627 6.75736 5.7627 8C5.7627 9.24265 6.77008 10.25 8.0127 10.25C9.25534 10.25 10.2627 9.24265 10.2627 8C10.2627 6.75736 9.25534 5.75001 8.0127 5.75ZM8 1.75C6.54463 1.75 5.20581 2.2479 4.14355 3.08203L5.9375 4.87598C6.53175 4.48044 7.24533 4.25 8.0127 4.25C8.77162 4.25 9.47709 4.47668 10.0674 4.86426L11.8516 3.08008C10.7899 2.24782 9.45355 1.75 8 1.75Z",fill:"currentColor"})),lO.createElement("defs",null,lO.createElement("clipPath",{id:"clip0_397_12417"},lO.createElement("rect",{width:16,height:16,fill:"white"})))),wJ=e=>lO.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",width:"96px",height:"96px",...e},lO.createElement("path",{fill:"#fff",d:"M24 4.050000000000001A19.95 19.95 0 1 0 24 43.95A19.95 19.95 0 1 0 24 4.050000000000001Z"}),lO.createElement("path",{fill:"#01579b",d:"M8.001,24c0,6.336,3.68,11.806,9.018,14.4L9.385,17.488C8.498,19.479,8.001,21.676,8.001,24z M34.804,23.194c0-1.977-1.063-3.35-1.67-4.412c-0.813-1.329-1.576-2.437-1.576-3.752c0-1.465,1.471-2.84,3.041-2.84 c0.071,0,0.135,0.006,0.206,0.008C31.961,9.584,28.168,8,24.001,8c-5.389,0-10.153,2.666-13.052,6.749 c0.228,0.074,0.307,0.039,0.611,0.039c1.669,0,4.264-0.2,4.264-0.2c0.86-0.057,0.965,1.212,0.099,1.316c0,0-0.864,0.105-1.828,0.152 l5.931,17.778l3.5-10.501l-2.603-7.248c-0.861-0.046-1.679-0.152-1.679-0.152c-0.862-0.056-0.762-1.375,0.098-1.316 c0,0,2.648,0.2,4.217,0.2c1.675,0,4.264-0.2,4.264-0.2c0.861-0.057,0.965,1.212,0.104,1.316c0,0-0.87,0.105-1.832,0.152l5.891,17.61 l1.599-5.326C34.399,26.289,34.804,24.569,34.804,23.194z M24.281,25.396l-4.8,13.952c1.436,0.426,2.95,0.652,4.52,0.652 c1.861,0,3.649-0.324,5.316-0.907c-0.04-0.071-0.085-0.143-0.118-0.22L24.281,25.396z M38.043,16.318 c0.071,0.51,0.108,1.059,0.108,1.645c0,1.628-0.306,3.451-1.219,5.737l-4.885,14.135C36.805,35.063,40,29.902,40,24 C40,21.219,39.289,18.604,38.043,16.318z"}),lO.createElement("path",{fill:"#01579b",d:"M4,24c0,11.024,8.97,20,19.999,20C35.03,44,44,35.024,44,24S35.03,4,24,4S4,12.976,4,24z M5.995,24 c0-9.924,8.074-17.999,18.004-17.999S42.005,14.076,42.005,24S33.929,42.001,24,42.001C14.072,42.001,5.995,33.924,5.995,24z"})),xJ=e=>lO.createElement("svg",{width:53,height:53,viewBox:"0 0 53 53",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},lO.createElement("rect",{width:53,height:53,fill:"#FFF9DB"}),lO.createElement("rect",{width:33,height:33,transform:"matrix(-1 0 0 1 43 10)",fill:"url(#pattern0)"}),lO.createElement("defs",null,lO.createElement("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:1,height:1},lO.createElement("use",{xlinkHref:"#image0_27_178",transform:"scale(0.002)"})),lO.createElement("image",{id:"image0_27_178",width:500,height:500,xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0CAMAAAD8CC+4AAAAY1BMVEUAAAD/yQD/yQD/yQD/yQD/yQD/yQD/yQD/yQD/yQD/yQD/yQD/yQD/yQD/yQD/yQD/yQD/////10D/zBD/5ID//PD/0CD/8sD/+OD/66D/3WD/9dD/4XD/7rD/55D/0zD/2lDEp+6zAAAAEHRSTlMAEPAgwEDgoIBg0DBwsJBQCloRUAAAC6xJREFUeNrs3Qlu4zAMQFFJlmx5q3n/0w48GAza1ImyRyL/u8KH64YMW2eST/94B93mlPMaJzkxxZhzmh108SmvkxRMa9548nXoxqGXq/XrwjPfNr8dBC8Kw8gT36huWeVu09I5NMaPUR40LTzvLUmDPMW6OTTBL708TZ953OvXDUGea+DtXrdukBeIyaFW/5OT3Yo9+etEfsjX5yg573bVDpOTXTOfgxwiu1Z78vfhc3sF9uRvFcj+aUs5Odl1GXv5iJAdrqIm+a4fHYpUJSf7R6RJPo7sb5WiVKFnJH+G2uRsYt5mrig52c9qb8hO9orUmJyR/HdmkpP9ZfyXVI3sfzW9V7nDwEjeWnI2MRaTk13RkJ3sJcaT7wIjeWvJ2cQ8aGsyOdmV7FXIfoTkjORJTvYbdasoQXYFexUOH3ckZxNDcrLrHbKTneQcPpKcTUy1h4gFZD9gfq/C4SPJGcmTnOxVHyIWkH3HXoXDR5KziWn1ELGA7AzZyU5yRvIkJ3tjh4gFZGevwuEjydnEkJzs1obsZCe5vcNHkpvbxLR7iFhAdvYqZCe51ZE8yc1l13OIWEB29ipmDx9Jbm4TQ3Jz2Rmym8tOchFjh48kF7G2ibFwiFhgLTt7lW9sHD6S/JT6kTzJf7CQnSH7L9qzk/wSlYePJC/Qt4mxfohYoDE7Q/YibdlJfgMdI3mSX01Ldp8F19OQnb3K510+fCS5Thc2MSTX62J2huxaHWUnuXqnh48kN+Glm5hE8kr9zM5exYg9O8nNiYnkBsXEIaJBMbFXMSh2/IFHg4aO4wV7QnaPmA3+sw0N+uTuxsa8WV/e3aXjMW/YNLs7jLzN27a4m/FLe/MG727imcApMHle5/aE2V1t5nWuRJhpbk9INDdopLk9Yaa5PeXqnq/BqVOq7vmsplDh8zrfl1ApugsWgUpf7qxZoNTGL3H2BO+O8Z1XxaI7tAkU+8POHd02CAQBED1wILkEJPqvNl+JZMsVMO+1MDIseycf443FVubW1odbEz2nyT1oG69clbm9fbzYLm5vjmc+0QP28WReBEw/9J7dGz1oGt17vse/x0XEZhnX8zn+2Lp3LI7XeqaLcT2np3vQ4uneM83uPacVbM9qMxP044Ct5/BK7zkdtvTsY4yLmMUt2J7Naqbn8Ke/PV+G954Pw3uP6EGrzXuQz/Qg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNED/pl506Q24ZhKAxfAY/gInGRfP9TdtyOp25qJ1phUOR3g8wfD0wJdI/eoB69QT16g3r0BvXoDerRG9SjN6hHb1CP3qAevUE9eoN69Ab16A3q0RvUozfoU9H9zYbfbPTUFL7/5Q5DCPbG9AEfis454UnKTK2IBc9KJHEfic7W4auxjexxwFdDJHHy0bPDC87S5ZmEV9JMouSjc8EfKv7lJfGEN1wkSeLROeG9YOi6osN7EwmSjs4J3xqv+k3eB3xrJDnC0TnhB85e8RsdW/wkkxjh6AV/NTTazYCfGZIiGz1jkXSt0e4LlhiYhIhGZ4eFyoVGe3ZYxpIQ0egWy11ltJuExTzJkIzODi+oObuegSd8peLcJhc946GV0R4d1nAkQzJ6wlqh6tHuA1a6kQjB6IwNpmpHO1u8oOQJjVj0G7ZwmapkBqw3kAjB6BbbDBWOdl+wCYkQjF6wVZipLtnhLRVP5cSiByxW94qFSUCPfrciet0rFjwBPfpDwC7DjWoQHXr0h7/RrzzafQB69CcFC1S9YsEWO80koYIjWzUrFuuP5tc/st2wWk0rFr5gt0QitD+GrWZ7MjvsN5EI3S9c7qoY7SZhtSZeuFDGRtpXLHjCIQaSoXeJ4onyFYvocAxLMtSuS/1L8YqFCTiIY5KhdDHyf0q3J/0IoLoPusYV6NcUvodhi4eKzmuk8LLDW9oe1rB1OI6bSYq6a03VZD82ORBJjPgFRodLZL8nr7e5qqvKtTyt8ZNDzc0V/SjBHsWQGDPiYM6QJD0/P7LXEJkEcEy4q/sQIh+deMQZ3DjTyebRYRcl27736OJ8wCmG7Ok0PifspGX57xFdmBlwjhSZTsCxYC89F7ce0cVlh5Okoz/vPhfspmnZ82PRiSecJk2GDmJswgFUXdR7ii7OF5zHlTzTTnMuDkdQttz7HF2eSTiTC9YwbWPsYcHVXcz8xd69YKcNA1EY3sJIHiQ/sPH+V1lVSVOdhkBpA753Rt8W/gPygBiOjV6vIDzZuGpM8oAUdVrCNcSjeeP46DJoeIW86nyvfYq7TjlcRz6aNwCi16P9ZU45T6qlf2NWLa3zKdxAP5o3IKLXO0duIOxUgYheF6G7gPE7TJDo9Rtq+0B26KBEr5cMjYP53S1OdOtHO9DOJKToIrvdo33CeGcv0KKLGD3aDx/NG3jRZTB4tAOM5g3A6CIXa0c7wmjegIxu7GjHGM0boNFFzmaOdpDRvAEbXYYtWAAzmjdwo4sk/qMdaDRvIEcXieRHO9Jo3sCOLjITH+1Yo3kDPboMGjihjeYN+Oj1igUhhDUZXyGIXm9PkgF+Zy8oorNdsUB9Zv+FJDrVFQusJXdXsETn+R4Gb53lJzzROW7WUCRnio6fnSQ5V3Ts7DTJ2aLjZidKzhcd8kn+tDElZ4xesmPN7eMZf0hrcUYvIsyHsxnvYswdtNFFkgK83Nne1yvi6MW+hkNloL8aeAB39H9Z88Wxvuyp2KMXl20MLzdukHff/o6B6HKvey/+BxvRi4su4SUW+uJiJnqR5vUUnmslPsd/sxS9+LzpD3If4eFsRS+GXXP4Znnb2T50u8Fg9Cqep/G7ttCd7bzC31iN/tNQyufwH5ZJo6kX+DvL0d+kqFsew0PGXHIbeEj/gv3o71KcVXPO4YYlZ9U52nhAv8FN9Eb6WBNZzbHwUPqDx+hdj+5Rj+5Qj+5Qj+5Qj+5Qj+5Qj+5Qj+5Qj+5Qj+5Qj+5Qj+5Qj+5Qj+5Qj+7QD/boQAAAAABAkL/1IJdC0oekD0kfkj4kfUj6kPQh6UPSh6QPSR+SPiR9SPqQ9CHpQ9KHpA9JH5I+JH1I+pD0IelD0oekD0kfkj4kfUj6kPQh6UPSh6QPSR+SPiR9SPqQ9CHpQ9KHpA9JH5I+JH1I+pD0IelD0oekD0kfkj4kfUj6kPQh6UPSh6QPSR+SPiR9KPbtLadhGAqD8Dhpc23A+18tskglqIoQvNX/fFsYxT2+1OiBjB7I6IGMHsjogYweyOiBjB7I6IGMHsjogYye58KlKozRA104qsIsLFVhFtaqMFeuVWF2SlUYYKqKsoHje5oZHN/T3MBJLs0OePqeZQDwIDbLQXOrCrLSjFVBRsCdepaNT29VMW7g+p5m5LRVhTg4eb2aY+WuDFURJgBHuSwLgKNclsIXc1WAGfzU04zgpx5mBj/1MEOhcYBPsnByrx5jKtx5LJfine98QdO/g2dGF/iODSOPfDfVuxXABT7KwckJPsZUeM4/PvRrh8af9SArDzyD797MD3wv162D3xSrd2YrWD1Ma271LK251bO05lbP0ppbPcvx2Nz9evdmnvBsrmsrf3b19uWlTTv/ULxpfWEf7dxBDkIhDATQKS1aPpX7H1dXrlx9REv+vCtM6KQk8K5zjvirKIHTOg/7lkwxI9js2ykNk4SvIDbjgnnKnX0jd8ULY7+QD5HPxM5uT68MxXdJ4318akcTLNAH/5ZM6jYUy/Tg5p6OhWK16saCT6KYV/yK1HAzTvu/OezhUQWnPAH1CSVWR8Ww8gAAAABJRU5ErkJggg=="}))),CJ=window.React.useCallback,_J=window.React.useEffect,SJ=window.React.useMemo,kJ=window.React.useState;(()=>{const e=window.yaymailData.i18n.locale_data.messages;e&&FE(e,"yaymail")})();const EJ=({children:e})=>Mn.jsx("span",{className:"yaymail-tabs-tab-btn__wrapper",style:{display:"flex",alignItems:"center"},children:e}),$J=({children:e})=>Mn.jsx("span",{className:"anticon",style:{marginRight:6},children:e}),MJ=[{key:"email-templates",label:Mn.jsxs(EJ,{children:[Mn.jsx($J,{children:Mn.jsx(mJ,{})}),Mn.jsx("span",{className:"yaymail-tab-name",children:__("Email Templates","yaymail")})]})},{key:"global-header-footer",label:Mn.jsxs(EJ,{children:[Mn.jsx($J,{children:Mn.jsx(fJ,{})}),Mn.jsx("span",{className:"yaymail-tab-name",children:__("Global Header & Footer","yaymail")}),Mn.jsx(Ka,{count:__("New","yaymail"),color:"#FCB900",style:{marginInlineStart:5}})]})},{key:"settings",label:Mn.jsxs(EJ,{children:[Mn.jsx($J,{children:Mn.jsx(vJ,{})}),Mn.jsx("span",{className:"yaymail-tab-name",children:__("Settings","yaymail")}),Mn.jsx(Ka,{count:__("New","yaymail"),color:"#FCB900",style:{marginInlineStart:5}})]})},{key:"go-pro",label:Mn.jsxs(EJ,{children:[Mn.jsx($J,{children:Mn.jsx(gJ,{})}),Mn.jsx("span",{className:"yaymail-tab-name",children:__("Go Pro","yaymail")})]})},{key:"addons",label:Mn.jsxs(EJ,{children:[Mn.jsx($J,{children:Mn.jsx(hJ,{})}),Mn.jsx("span",{className:"yaymail-tab-name",children:__("Addons","yaymail")})]})},{key:"preview-email",label:Mn.jsxs(EJ,{children:[Mn.jsx($J,{children:Mn.jsx(yJ,{})}),Mn.jsx("span",{className:"yaymail-tab-name",children:__("Preview Email","yaymail")})]})}],RJ=()=>{var e,t;const n=h_(),i=m_(),o=function(){let{matches:e,loaderData:t}=$_(S_.UseMatches);return i_.useMemo((()=>e.map((e=>{let{pathname:n,params:i}=e;return{id:e.route.id,pathname:n,params:i,data:t[e.route.id],handle:e.route.handle}}))),[e,t])}(),[r,a]=kJ((null==(e=MJ[0])?void 0:e.key)??""),[s,l]=kJ(!1),c=hM((e=>e.isReviewed)),u=hM((e=>e.setIsReviewed)),d=FX((e=>e.isCriticalMigrationRequired));_J((()=>{const e=()=>{l(window.scrollY>0)};return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)}),[]),_J((()=>{n.pathname&&("/go-pro"!==n.pathname?a(n.pathname.slice(1)):a("go-pro"))}),[n]);const h=SJ((()=>o.filter((e=>{return!!e.handle&&"object"==typeof(t=e.handle)&&Object.prototype.hasOwnProperty.call(t,"crumbTitle");var t})).map((e=>{const t=e.handle.crumbTitle,n="/"===e.pathname?MJ[0].key:e.pathname;return{title:Mn.jsx("span",{"data-path":n,className:"yaymail-breadcrumb-item",children:t}),onClick:e=>{var t,n;e.target instanceof HTMLElement&&(null==(t=e.target.dataset)?void 0:t.path)&&("/email-templates"===e.target.dataset.path?a(null==(n=MJ[0])?void 0:n.key):a(e.target.dataset.path),i(e.target.dataset.path))}}}))),[o]),p=CJ((e=>{let t=`${e}`;"global-header-footer"===e&&(t="customizer/?template=yaymail_global_header_footer"),n.pathname!==`/${e}`&&(a(e),i(t))}),[i,n]);return Mn.jsx(Mn.Fragment,{children:Mn.jsxs(Ab,{style:{background:"#f0f0f1"},children:[Mn.jsxs("div",{className:"yaymail-header__navbar "+(s?"yaymail-header__navbar--scrolled":""),children:[Mn.jsxs("div",{className:"yaymail-header__navbar--left",children:[Mn.jsx("span",{className:"yaymail-header__logo",children:Mn.jsx(xJ,{})}),Mn.jsx(bh,{activeKey:d?"settings":r,className:"yaymail-dashboard-tabs",defaultActiveKey:null==(t=MJ[0])?void 0:t.key,onChange:p,items:MJ})]}),Mn.jsxs("div",{className:"yaymail-header__navbar--right",children:[Mn.jsxs(Z_,{to:"https://docs.yaycommerce.com/yaymail",target:"_blank",className:"yaymail-navlink",children:[Mn.jsx(pJ,{className:"yaymail-navlink--icon"}),Mn.jsx("span",{className:"yaymail-navlink--text",children:__("Documentation","yaymail")})]}),Mn.jsxs(Z_,{to:"https://yaycommerce.com/support/",target:"_blank",className:"yaymail-navlink",children:[Mn.jsx(bJ,{className:"yaymail-navlink--icon"}),Mn.jsx("span",{className:"yaymail-navlink--text",children:__("Support","yaymail")})]})]})]}),Mn.jsx(Mb,{style:{minHeight:"100vh",paddingTop:"50px"},children:Mn.jsx(N_,{})}),Mn.jsx($b,{className:"yaymail-footer",children:Mn.jsxs("div",{className:"yaymail-footer-wrap",children:[Mn.jsxs(bn,{style:{height:"100%"},children:[Mn.jsx(Z_,{to:"#",children:Mn.jsx(WD,{component:wJ})}),Mn.jsx(fs,{separator:">",items:h})]}),c?Mn.jsx("span",{className:"yaymail-footer-review-text",children:__("Thank you for using YayMail.","yaymail")}):Mn.jsxs("span",{className:"yaymail-footer-review-text",children:[__("We need your support to keep updating and improving the plugin. Please, ","yaymail"),Mn.jsx(Z_,{target:"_blank",to:"https://wordpress.org/support/plugin/yaymail/reviews/",onClick:async()=>{try{u(!0),await dE()}catch(e){console.error(e)}},children:__("help us by leaving a good review","yaymail")})," ",__(" :) Thanks!","yaymail")]})]})})]})})};async function AJ(e){return await KR("/addons/activate",{addon:e})}async function OJ(e){return await KR("/addons/deactivate",{addon:e})}const jJ=window.React.createContext,TJ=window.React.useEffect,NJ=window.React.useMemo,LJ=window.React.useState,IJ=jJ({filteredAddons:[],listingAddons:[],searchText:"",category:"all",status:"all",isFetching:!1,setSearchText:e=>{},setCategory:e=>{},setStatus:e=>{},currentPage:1,totalPages:0,totalItems:0,setCurrentPage:e=>{}});function DJ({children:e}){const[t,n]=LJ(""),[i,o]=LJ("all"),[r,a]=LJ("all"),[s,l]=LJ(1),{isFetching:c,data:u}={...sk({queryKey:["addons"],queryFn:async()=>{const e=await async function(){return await qR("/addons",{params:void 0})}();if(e.data&&e.data.isError)throw new Error(e.data.message??"Unknown error");return e.data},retry:!1,refetchOnWindowFocus:!1,keepPreviousData:!0})},d=NJ((()=>u??[]),[u]),h=NJ((()=>(d??[]).filter((e=>e.plugin_name.toLowerCase().includes(t.toLowerCase().trim())&&("all"===i||((null==e?void 0:e.categories)??[]).includes(i))&&("all"===r||e.installation_status.is_active===("active"===r))))),[d,t,i,r]),p=NJ((()=>h.slice(18*(s-1),18*s)),[h,s]),m=NJ((()=>Math.ceil(h.length/18)),[h]),f=NJ((()=>h.length),[h]),g=NJ((()=>({filteredAddons:h,searchText:t,category:i,status:r,setSearchText:n,setCategory:o,setStatus:a,isFetching:c,currentPage:s,totalPages:m,totalItems:f,setCurrentPage:l,listingAddons:p})),[h,t,i,r,c,s,m,f,p]);return TJ((()=>{l(1)}),[h]),Mn.jsx(IJ.Provider,{value:g,children:e})}const HJ=window.React.useContext,PJ=window.React.useEffect,zJ=window.React.useRef,FJ=window.React.useState;function VJ(){const{setSearchText:e,isFetching:t}=HJ(IJ),[n,i]=FJ("");PJ((()=>{const t=setTimeout((()=>{e(n)}),200);return()=>clearTimeout(t)}),[n,e]);const o=zJ(null);return PJ((()=>{var e;o.current&&(null==(e=o.current.input)||e.focus())}),[t]),Mn.jsx("div",{className:"yaymail-addons-search",children:Mn.jsx(bb,{placeholder:"Search addons",allowClear:!0,value:n,onChange:e=>i(e.target.value),disabled:t,ref:o,suffix:Mn.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Mn.jsx("path",{d:"M13.6922 13.8L17 17M15.9333 8.46667C15.9333 12.5904 12.5904 15.9333 8.46667 15.9333C4.34294 15.9333 1 12.5904 1 8.46667C1 4.34294 4.34294 1 8.46667 1C12.5904 1 15.9333 4.34294 15.9333 8.46667Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})})})})}const BJ=window.React.useContext,WJ=window.React.useEffect,UJ=[{label:__("All addons","yaymail"),value:"all"},{label:__("Marketing","yaymail"),value:"marketing"},{label:__("Payments","yaymail"),value:"payments"},{label:__("Membership","yaymail"),value:"membership"},{label:__("Multivendor","yaymail"),value:"multivendor"},{label:__("Subscription","yaymail"),value:"subscription"},{label:__("Order status","yaymail"),value:"order-status"},{label:__("Booking","yaymail"),value:"booking"},{label:__("Wholesale","yaymail"),value:"wholesale"},{label:__("Shipment","yaymail"),value:"shipment"},{label:__("Others","yaymail"),value:"others"}],YJ=[{label:__("All","yaymail"),value:"all"},{label:__("Active","yaymail"),value:"active"},{label:__("Inactive","yaymail"),value:"inactive"}];function ZJ(){const{category:e,status:t,setCategory:n,setStatus:i,isFetching:o}=BJ(IJ);return WJ((()=>{let e;document.querySelectorAll(".yaymail-addons-filters__categories").forEach((t=>{t.addEventListener("pointerdown",(n=>{e=setTimeout((()=>{t.setPointerCapture(n.pointerId),t.classList.add("dragging")}),150)})),t.addEventListener("pointerup",(n=>{t.releasePointerCapture(n.pointerId),t.classList.remove("dragging"),clearTimeout(e)})),t.addEventListener("pointermove",(n=>{if(t.classList.contains("dragging"))return t.hasPointerCapture(n.pointerId)&&(t.scrollLeft-=n.movementX);clearTimeout(e)}))}))}),[]),WJ((()=>{const e=document.querySelector(".yaymail-addons-filters__categories");e.addEventListener("wheel",(t=>{t.preventDefault(),e.scrollLeft+=t.deltaY}),{passive:!1})}),[e]),Mn.jsxs("div",{className:"yaymail-addons-filters",children:[Mn.jsx("div",{className:"yaymail-addons-filters__categories",children:UJ.map((t=>Mn.jsx("div",{className:"yaymail-addons-filters__categories-item "+(t.value===e?"active":""),onClick:e=>{o||(e.preventDefault(),e.stopPropagation,n(t.value))},children:t.label},t.value)))}),Mn.jsx("div",{className:"yaymail-addons-filters__statuses",children:YJ.map((e=>Mn.jsx("div",{className:"yaymail-addons-filters__statuses-item "+(e.value===t?"active":""),onClick:t=>{o||(t.preventDefault(),t.stopPropagation,i(e.value))},children:e.label},e.value)))})]})}const GJ=window.React.useContext;function qJ(){const{listingAddons:e}=GJ(IJ);return Mn.jsx("div",{className:"yaymail-addons-table-grid",children:e.map((e=>Mn.jsx(KJ,{addon:e},e.plugin_name)))})}const KJ=({addon:e})=>{const{activateAddonMutation:t,deactivateAddonMutation:n}=function(){const e=QS();return{activateAddonMutation:ok({mutationFn:AJ,onSuccess:(t,n)=>{var i;(null==(i=t.data)?void 0:i.success)&&e.setQueryData(["addons"],(e=>e.map((e=>(e.plugin_slug===n&&(e.installation_status.is_active=!0),e)))))}}),deactivateAddonMutation:ok({mutationFn:OJ,onSuccess:(t,n)=>{var i;(null==(i=t.data)?void 0:i.success)&&e.setQueryData(["addons"],(e=>e.map((e=>(e.plugin_slug===n&&(e.installation_status.is_active=!1),e)))))}})}}(),i=window.yaymailData.yaymailHooks.applyFilters("yaymail_addon_settings_info","",e);return Mn.jsxs("div",{className:"yaymail-addons-table-grid__item",children:[Mn.jsxs("div",{className:"yaymail-addons-table-grid__item-info",children:[Mn.jsx("img",{src:e.image??"https://images.wpbrandy.com/uploads/addon-placeholder.png",alt:e.plugin_name,className:"yaymail-addons-table-grid__item-image"}),Mn.jsx("h3",{className:"yaymail-addons-table-grid__item-info-title",children:e.plugin_name}),Mn.jsx("p",{className:"yaymail-addons-table-grid__item-info-description",dangerouslySetInnerHTML:{__html:e.description}})]}),Mn.jsxs("div",{className:"yaymail-addons-table-grid__item-actions",children:[Mn.jsxs("div",{className:"yaymail-addons-table-grid__item-actions-head",children:[Mn.jsx(Ct,{size:"small",className:"yaymail-addons-table-grid__item-view-details",href:e.link_upgrade??"",target:"_blank",children:__("View Details","yaymail")}),e.installation_status.is_active&&i&&Mn.jsx(Ct,{className:"yaymail-addons-table-grid__item-view-settings",href:i.url,icon:Mn.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Mn.jsx("path",{d:"M7.61565 17.9888C6.21935 17.5731 4.97648 16.8013 3.99234 15.7787C4.35948 15.3436 4.58073 14.7814 4.58073 14.1675C4.58073 12.7868 3.46144 11.6675 2.08073 11.6675C1.99721 11.6675 1.91464 11.6716 1.83323 11.6796C1.72231 11.1373 1.66406 10.5759 1.66406 10.0008C1.66406 9.12974 1.79772 8.28987 2.04564 7.50057C2.05732 7.50074 2.06901 7.50083 2.08073 7.50083C3.46144 7.50083 4.58073 6.38153 4.58073 5.00083C4.58073 4.60445 4.48848 4.22962 4.32431 3.89665C5.28802 3.00056 6.46427 2.32995 7.7691 1.96875C8.18256 2.77919 9.02519 3.33416 9.9974 3.33416C10.9696 3.33416 11.8122 2.77919 12.2257 1.96875C13.5305 2.32995 14.7068 3.00056 15.6705 3.89665C15.5063 4.22962 15.4141 4.60445 15.4141 5.00083C15.4141 6.38153 16.5334 7.50083 17.9141 7.50083C17.9258 7.50083 17.9375 7.50074 17.9491 7.50057C18.1971 8.28987 18.3307 9.12974 18.3307 10.0008C18.3307 10.5759 18.2725 11.1373 18.1616 11.6796C18.0801 11.6716 17.9976 11.6675 17.9141 11.6675C16.5334 11.6675 15.4141 12.7868 15.4141 14.1675C15.4141 14.7814 15.6353 15.3436 16.0024 15.7787C15.0183 16.8013 13.7754 17.5731 12.3791 17.9888C12.0569 16.9807 11.1124 16.2508 9.9974 16.2508C8.8824 16.2508 7.9379 16.9807 7.61565 17.9888Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"}),Mn.jsx("path",{d:"M10.0026 12.9173C11.6134 12.9173 12.9193 11.6115 12.9193 10.0007C12.9193 8.38982 11.6134 7.08398 10.0026 7.08398C8.39177 7.08398 7.08594 8.38982 7.08594 10.0007C7.08594 11.6115 8.39177 12.9173 10.0026 12.9173Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})]})})]}),Mn.jsx("div",{className:"yaymail-addons-table-grid__item-actions-tail",children:e.installation_status.is_installed?Mn.jsx(ww,{checked:e.installation_status.is_active,loading:t.isLoading||n.isLoading,onChange:()=>e.installation_status.is_active?n.mutate(e.plugin_slug):t.mutate(e.plugin_slug)}):Mn.jsx("span",{className:"yaymail-addons-not-installed-badge",children:__("Not installed","yaymail")})})]})]},e.plugin_slug??"")},QJ=window.React.useContext,XJ=()=>Mn.jsx("svg",{width:"7",height:"12",viewBox:"0 0 7 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Mn.jsx("path",{d:"M6 11L1 6L6 1",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),JJ=()=>Mn.jsx("svg",{width:"7",height:"12",viewBox:"0 0 7 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Mn.jsx("path",{d:"M1 11L6 6L1 1",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})});function e1(){const{currentPage:e,totalPages:t,setCurrentPage:n}=QJ(IJ);return Mn.jsxs("div",{className:"yaymail-addons-table-navigation",children:[Mn.jsx("div",{className:"yaymail-addons-table-navigation__item "+(1===e?"disabled":""),onClick:()=>{e>1&&n(e-1)},children:Mn.jsx(XJ,{})}),Array.from({length:t}).map(((t,i)=>Mn.jsx("div",{className:"yaymail-addons-table-navigation__item "+(e===i+1?"active":""),onClick:()=>n(i+1),children:Mn.jsx("span",{children:i+1})},i))),Mn.jsx("div",{className:"yaymail-addons-table-navigation__item "+(e===t?"disabled":""),onClick:()=>{e0?Mn.jsxs(Mn.Fragment,{children:[Mn.jsx(qJ,{}),Mn.jsx(e1,{})]}):Mn.jsx(kn,{description:__("No addons found","yaymail")})]})}function i1(){return Mn.jsx(DJ,{children:Mn.jsxs("div",{className:"yaymail-addons-container",children:[Mn.jsxs("div",{className:"yaymail-addons-header",children:[Mn.jsx("h2",{className:"yaymail-addons-header__title",children:__("Explore 70+ WooCommerce Email Customizer Addons","yaymail")}),Mn.jsx("p",{className:"yaymail-addons-header__description",children:__("Connect extensions to create custom WooCommerce emails with YayMail!","yaymail")}),Mn.jsx(VJ,{})]}),Mn.jsx(n1,{})]})})}const o1=()=>Mn.jsx(JQ,{title:"",className:"yaymail-addons",children:Mn.jsx(i1,{})}),r1=()=>{const e=h_();return"yaymail_global_header_footer"===new URLSearchParams(e.search).get("template")?Mn.jsx(gX,{}):Mn.jsx(XQ,{})},a1=V_([{path:"/",element:Mn.jsx(RJ,{}),handle:{crumbTitle:"YayMail"},children:[{path:"",element:Mn.jsx(T_,{to:"email-templates"})},{path:"email-templates",element:Mn.jsx(lX,{}),handle:{crumbTitle:__("Email Templates","yaymail")}},{path:"settings",element:Mn.jsx(dJ,{}),handle:{crumbTitle:__("Settings","yaymail")}},{path:"go-pro",element:Mn.jsx(EX,{}),handle:{crumbTitle:__("Go Pro","yaymail")}},{path:"addons",element:Mn.jsx(o1,{}),handle:{crumbTitle:__("Addons","yaymail")}},{path:"preview-email",element:Mn.jsx(OX,{}),handle:{crumbTitle:__("Preview Email","yaymail")}},{path:"*",element:Mn.jsx($X,{})}]},{path:"customizer",element:Mn.jsx(r1,{}),handle:{crumbTitle:__("Email Customizer","yaymail")}},{path:"*",element:Mn.jsx($X,{})}]),s1=V_([{path:"/",element:Mn.jsx(RJ,{}),handle:{crumbTitle:"YayMail"},children:[{path:"",element:Mn.jsx(T_,{to:"/settings#/migration"})},{path:"settings",element:Mn.jsx(dJ,{}),handle:{crumbTitle:__("Settings","yaymail")}},{path:"*",element:Mn.jsx(T_,{to:"/settings#/migration"})}]},{path:"*",element:Mn.jsx(T_,{to:"/settings#/migration"})}]),l1=()=>{const e=FX((e=>e.isCriticalMigrationRequired));return Mn.jsx(O_,{router:e?s1:a1})},c1=window.React.useEffect;function u1(){return c1((()=>{window.yaymailData.shared={...window.yaymailData.shared,util_functions:{getDimensionValue:UE,setValueByPath:ZE,replacePlaceholders:GE,__:__},stores:{useAddonStore:tF,useTemplateContentStore:eM,useCustomizerSettingsStore:cE},core_components:{ElementWrapper:uH,propertyBuilders:Uz},hooks:{useShortcode:eF},antd:{Button:Ct,Input:bb,Menu:Cn,Modal:Gb,Tooltip:he,Switch:ww,Skeleton:Zo,message:Vb,DatePicker:Jg},antd_icons:{DeleteOutlined:yI},provider:{AntdConfigProvider:rx},react_query:{useQuery:sk,useMutation:ok}},window.yaymailData.yaymailHooks=window.wp.hooks.createHooks(),document.dispatchEvent(new CustomEvent("yaymail-loaded"));const e=e=>{e.preventDefault()};return document.addEventListener("dragover",e),()=>{document.removeEventListener("dragover",e)}}),[]),Mn.jsxs(Mn.Fragment,{children:[Mn.jsx(Ix,{}),Mn.jsx(l1,{}),Mn.jsx("div",{id:"yaymail-portal-root"}),Mn.jsx("div",{id:"yaymail-dom-placeholder"})]})}var d1={exports:{}};d1.exports={ReactQueryDevtools:function(){return null},ReactQueryDevtoolsPanel:function(){return null}};var h1=d1.exports;const p1=new DS({defaultOptions:{queries:{staleTime:18e5}}}),m1=e=>Mn.jsxs(XS,{client:p1,children:[e.children,e.enableDevtools&&Mn.jsx(h1.ReactQueryDevtools,{initialIsOpen:!1})]});function f1(e,t=""){return Object.keys(e).reduce(((n,i)=>{const o=e[i],r=t?`${t}-${i}`:i;if("object"==typeof o&&null!==o){const e=f1(o,r);Object.assign(n,e)}else n[r]=o;return n}),{})}document.addEventListener("DOMContentLoaded",(()=>{Object.entries(f1(ix,"--yaymail")).forEach((([e,t])=>{document.documentElement.style.setProperty(e,t)}))}));const g1=({error:e})=>Mn.jsxs("div",{style:{padding:"20px",textAlign:"center"},children:[Mn.jsx("h2",{children:"Something went wrong:"}),Mn.jsx("pre",{style:{color:"red"},children:e.message}),Mn.jsx("button",{onClick:()=>window.location.reload(),style:{marginTop:"10px",padding:"8px 16px",backgroundColor:"#007cba",color:"white",border:"none",borderRadius:"4px",cursor:"pointer"},children:"Reload Page"})]}),y1=document.getElementById("yaymail-main-pages");null!=y1&&(window.ReactDOM.createRoot?window.ReactDOM.createRoot(y1).render(Mn.jsx(Tn,{FallbackComponent:g1,children:Mn.jsx(rx,{children:Mn.jsx(m1,{enableDevtools:!0,children:Mn.jsx(u1,{})})})})):window.ReactDOM.render(Mn.jsx(Tn,{FallbackComponent:g1,children:Mn.jsx(rx,{children:Mn.jsx(m1,{enableDevtools:!0,children:Mn.jsx(u1,{})})})}),y1))}},function(){return Rn||(0,Mn[t(Mn)[0]])((Rn={exports:{}}).exports,Rn),Rn.exports});export default An();